After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 552959 - GtkTrayIcon: _NET_SYSTEM_TRAY_VISUAL and real transparency
GtkTrayIcon: _NET_SYSTEM_TRAY_VISUAL and real transparency
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-09-19 23:20 UTC by Owen Taylor
Modified: 2008-09-27 04:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch as described (16.96 KB, patch)
2008-09-19 23:20 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2008-09-19 23:20:11 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.
Comment 1 Owen Taylor 2008-09-19 23:20:42 UTC
Created attachment 119022 [details] [review]
Patch as described
Comment 2 Matthias Clasen 2008-09-27 04:28:08 UTC
        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