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 707614 - legacy tray icons: Add workaround for opaque region issue
legacy tray icons: Add workaround for opaque region issue
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 707398 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-09-06 09:36 UTC by drago01
Modified: 2013-09-06 20:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
legacy tray icons: Add workaround for opaque region issue (1.41 KB, patch)
2013-09-06 09:36 UTC, drago01
none Details | Review
legacy tray icons: Add workaround for opaque region issue (1.66 KB, patch)
2013-09-06 14:34 UTC, drago01
none Details | Review
embedded-window: Set as app-paintable to workaround opaque region issues (1.23 KB, patch)
2013-09-06 18:34 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description drago01 2013-09-06 09:36:52 UTC
Yes I know there is a bug filed about this somewhere but
I can't find it so filed a new one.
Comment 1 drago01 2013-09-06 09:36:55 UTC
Created attachment 254238 [details] [review]
legacy tray icons: Add workaround for opaque region issue

Status icons seem to set a wrong opaque region
that covers the translucent parts of the icon causing it
to be rendered black. So simply remove the opaque region
causing them to always blend with the background.

While not perfect from a performance pov the icons are
small so we are not loosing much by not disabling blending
while painting them.
Comment 2 Florian Müllner 2013-09-06 10:10:21 UTC
*** Bug 707398 has been marked as a duplicate of this bug. ***
Comment 3 Armin K. 2013-09-06 10:25:52 UTC
I still have the problem, even with the patch applied.
Comment 4 drago01 2013-09-06 14:34:58 UTC
Created attachment 254249 [details] [review]
legacy tray icons: Add workaround for opaque region issue

Status icons seem to set a wrong opaque region
that covers the translucent parts of the icon causing it
to be rendered black. So simply remove the opaque region
causing them to always blend with the background.

While not perfect from a performance pov the icons are
small so we are not loosing much by not disabling blending
while painting them.

--

Setting it once is not enough we have to reset it to NULL on each allocation.
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-09-06 18:34:36 UTC
Created attachment 254297 [details] [review]
embedded-window: Set as app-paintable to workaround opaque region issues

In specific cases, GTK+ does not have enough information to set a correct
opaque region, in which the recommended fix is to set your window as
app-paintable. In the tray icon case, the socket window was considered
opaque but GTK+ as it had a solid window background, but it cannot have an
opaque region set, as the plug isn't composited against the socket, but
instead punches through the socket window.
Comment 6 drago01 2013-09-06 18:39:49 UTC
Review of attachment 254297 [details] [review]:

OK, this is a cleaner solution and seems to work fine for me.

::: src/shell-embedded-window.c
@@ +120,3 @@
    */
   g_object_set (object,
+                "app-paintable", TRUE,

Maybe you want to add a comment here as well?
Comment 7 Jasper St. Pierre (not reading bugmail) 2013-09-06 20:37:33 UTC
Attachment 254297 [details] pushed as 08f9526 - embedded-window: Set as app-paintable to workaround opaque region issues