Ok, finally found where the ultimate problem is (I think). After changing the video card, [NSScreen mainScreen], and the only element of [NSScreen screens] (on my laptop w/o external monitor) change to a different value than they used to be, which causes Growl to start using a new, empty set of occupied rectangles in the function I referenced earlier (because it looks to growl, I assume, like we changed monitors).
That is probably as far as I can debug it directly. It seems that to fix this, we have to be able to figure out when a change in mainScreen represents a graphics card change but not a screen change, and when it represents actually changing the screen. Unfortunately, I am not at all familiar with this kind of code, so I am not well-equipped to make a fix. But, at least I (think I) found the underlying problem. However, if this is the case, then other people may be able to test this, if you have a dual monitor setup on any mac, by simply changing which monitor is the "main" monitor (in System Preferences) while growl is running (I am blindly guessing that this will have a similar effect). I can double-check this later tonight when I get home with an external monitor. On May 9, 2011, at 2:03 PM, Dylan Ryan wrote: > Well, I've partially narrowed it down. Still working further, but this may > help. > > I narrowed it GrowlPositionController.m, the -reservedRectsForScreen function > (around line 544ish). It looks like after the graphics card change, the > > result = (NSMutableSet *)CFDictionaryGetValue(reservedRects, screen); > > line returns nil, and so a new one is created and used. All OTHER > notifications always have the same address, but every card change, that > function returns nil so a new one is made. Further, it looks like the screen > variable that that call uses has a different address only after changing the > cards. I'll look further to see if I can find out why, but at least this is > something changing when the graphics card changes. Maybe that's enough to > make sense to someone else, though, since I'm really shooting blind here. > > > On May 9, 2011, at 11:25 AM, Peter Hosey wrote: > >> On May 9, 2011, at 11:16:14, Dylan Ryan wrote: >>> Do you have any suggestions on where to look in the code? >> >> Positions are allocated and tracked by the position controller. Like all GHA >> and prefpane classes, it's in Core/Source. >> >> Displays are in Plugins/Displays. This includes the handful of classes that >> are technically compiled into GHA but used only by the displays, mainly if >> not exclusively as superclasses. >> >> Each display is represented by a GrowlDisplayPlugin instance. Each visual >> display's GrowlDisplayPlugin is responsible for creating >> GrowlNotificationDisplayBridges, each of which creates one or more >> (currently always one) GrowlDisplayWindowController, each of which manages >> one notification window. Each window controller is what requests reservation >> of an area on the screen from the position controller. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Growl Discuss" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/growldiscuss?hl=en. >> > -- You received this message because you are subscribed to the Google Groups "Growl Discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/growldiscuss?hl=en.
