GNOME Bugzilla – Bug 552959
GtkTrayIcon: _NET_SYSTEM_TRAY_VISUAL and real transparency
Last modified: 2008-09-27 04:28:08 UTC
This patch adds support for the _NET_SYSTEM_TRAY_VISUAL property described in: http://lists.freedesktop.org/archives/xdg/2008-September/009919.html Additionally, if _NET_SYSTEM_TRAY_VISUAL is a visual with an alpha channel, the parent-relative-background hack is skipped and we draw with a real transparent background. Bug 552953 adds support _NET_SYSTEM_TRAY_VISUAL to gnome-panel's notification area. Other notes about the patch: * Monitoring the manager selection is moved out of the realize/unrealize cycle and is instead set up in a constructed() handler. Doing it in realize/unrealize didn't really make sense once the possibility of unrealizing and realizing to match _NET_SYSTEM_TRAY_VISUAL exists. * I removed the dependency on RC string parsing to do the parent-relative background for fake transparency and just set the parent-relative background with realize (and overrode style_set()) * I cleaned up the property fetching a bit.. it wasn't checking the type of the returned properties correctly for one thing.
Created attachment 119022 [details] [review] Patch as described
Bug 552959 – GtkTrayIcon: _NET_SYSTEM_TRAY_VISUAL and real transparency * gtk/gtktrayicon-x11.c: Add support for the _BET_SYSTEM_TRAY_VISUAL property described in http://lists.freedesktop.org/archives/xdg/2008-September/009919.html If _NET_SYSTEM_TRAY_VISUAL is a visual with an alpha channel, the parent-relative-background hack is skipped and we draw with a real transparent background. * gtk/gtkrc.c: Remove the default GtkTrayIcon style, since the parent-relative background is now set when realizing the tray icon. Patch by Owen Taylor