GNOME Bugzilla – Bug 165979
Window Selector initial background is not correct
Last modified: 2015-03-24 13:00:49 UTC
Add a window selector to a panel. Make this panel very large. Make it transparent. Restart the panel. Look at the window selector background and wonder what broke ;-) Vincent: you're my personal window selector hero, so I'm cc'ing you.
Created attachment 36849 [details] [review] patch with obviously broken indentation Here is a patch that fixes the bug. The patch is not as clever as I'd liked, but it works. What happens here is that the WnckSelector requests a small size, then asks for the background pixmap, then resizes itself. The pixmap is too small for the new size. In panel-menu-bar.c, this case is handled by using the panel_background_* functions. I don't think these functions are supposed to be used in regular applets though...
This wasn't working very nice with some sizes (since the size we have in fill() is not the real one). So I fixed it by updating the background in _allocate(). > In panel-menu-bar.c, this case is handled by using the panel_background_* > functions. I don't think these functions are supposed to be used in regular > applets though... panel_background_* is not in libpanel-applet. And the panel menu bar uses this because it has no access to libpanel-applet.
I was not aware of the panbel_applet_get_background function. This is indeed much better :-) thanks !