I am fairly sure that this is just a bug in the codes logic, but I thought I should check first I noticed that the function was always returning true if only one grab is checked for (maybe other cases too) If nobody shouts I shall commit it because the behaviour in my plugin is now as expected. -------------- next part -------------- diff --git a/src/screen.c b/src/screen.c index 7dcc452..959b72f 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2427,7 +2427,7 @@ otherScreenGrabExist (CompScreen *s, ...) va_end (ap); - if (!name) + if (name) return TRUE; } }
On Fri, 2007-05-04 at 00:49 +0100, Mike Dransfield wrote:> I am fairly sure that this is just a bug in the codes logic, but > I thought I should check firsthm, I think the code is currently doing the correct thing.> > I noticed that the function was always returning true if only > one grab is checked for (maybe other cases too)I fail to see why. Can you provide some more details of what you're doing? - David
Hi,> I am fairly sure that this is just a bug in the codes logic, but > I thought I should check first > > I noticed that the function was always returning true if only > one grab is checked for (maybe other cases too) > > If nobody shouts I shall commit it because the behaviour in > my plugin is now as expected.In this case you expect a screenGrabExist function that returns TRUE if any of the listed plugins has a screen grab - at least that's what your code does ;-) If you return TRUE if name != NULL this means you return TRUE if the currently compared screen grab (in the loop) matches one of your listed plugin names. otherScreenGrabExist is supposed to return TRUE if any _other_ plugin than those listed has a screen grab. Regards, Danny