GNOME Bugzilla – Bug 353781
panel transparency broken when screen resolution is increased
Last modified: 2007-01-14 22:28:16 UTC
Please describe the problem: I am using a transparent panel. However when I change the screen resolution from 1280x854 to say 1280x1024 the panel in the bottom just displays garbage == random memory dumps as background. Same holds if I resize to say 1600x1200, then the upper panel's background is distorted from 1280 pixels on (and the bottom one totally) Killing/Restarting the panel after resolution change fixes the problem. Steps to reproduce: 1. start gnome panel, make it transparent + use some background desktop picture in a low resolution screen 2. increase resolution Actual results: -> see garbage Expected results: Does this happen every time? 100% reproducable Other information: Killing/Restarting the panel after resolution change fixes the problem. I guess it should just watch get itself beeing notified on resolution changes... should be trivial to fix. This happens in all versions since transparency in the panel is supported.
After investigating the code for quite some time I've found the problem, the call to gdk_drawable_get_size with a window as the argument is not appropriate, as it will always return not the current size of the root window, but the size of the most-recently-processed configure event (which is the old size). From the manual of gdk_drawable_get_size: ===snip=== On the X11 platform, if drawable is a GdkWindow, the returned size is the size reported in the most-recently-processed configure event, rather than the current size on the X server. ===snip=== Therefore one should instead of: gdk_drawable_get_size ( GDK_DRAWABLE (monitor->gdkwindow), &rwidth, &rheight); better use: gdk_window_get_geometry((monitor->gdkwindow), NULL, NULL, &rwidth, &rheight, NULL); (though the latter has 16bit size limits for the window size) I am attaching a patch, which I tested on my machine -> it is working. Please test,comment/apply. Soeren.
Created attachment 72101 [details] [review] The one-liner patch The patch for panel 2.14.3
as no one even has had a brief look at this for two months, I am exploding the severity.
Thanks!