Created attachment 5273 Fix transparency issues with GTK3 plugins When using the panel from git master (last commit 964741f5b67e5f4fa97bab338d980c5eea0fa09b) the panel has transparency issues with GTK3 plugins and doesn't apply custom colors or images for the panel background. This patch uses some GTK3 CSS magic written by Simon Steinbeiß to make the GtkPlug button in the panel transparent. This patch also removes the wrapper_plug_draw code and instead updates the panel's background when the respective set function is called for gtk3 plugins.
Hi Eric, Works pretty well but I have spotted one problem (below). It is quite a big change from how it worked before. Do we have to switch from draw method to gdk_window_set_background_pattern and gdk_window_set_background_rgba? Also, if you are no longer using draw method it can be removed completely, rather than forwarding rendering to a parent class. The problem I have noticed that external gtk3 plugins draw a background image from offset (0,0) rather than blend into the rest of the panel (tested with xfce4-indicator-plugin in deskbar-mode, plugin placed near the bottom of the panel).
Correction. This happens with all external plugins (including Gtk2 notification area and action buttons).
Created attachment 5274 Fix transparency issues with GTK3 plugins So I think I have it working using the stuff that was in the draw code and I added a call to hopefully transform the drawing back to window coordinates. Let me know if I missed anything.
Thank you for putting this in the draw method. Not sure which approach is better but this seems closer to was was in the code before - so it should be less risky. I still get the same behaviour, though - all external plugins have their background images offset. That is: there are several background images visible, one at the origin of the panel window, others at origins of external plugins. I have noticed another (smaller) issue: when I select a background image, after a small delay (~0.5s) it shifts by a couple of pixels down/right.
A question, was it also a problem in older (4.10) versions of the panel? You have only modified the draw method (gtk3) but gtk2 external plugins (systray, action buttons) that use an unmodified expose_event method have the same problem here.
Patch from Comment #3 pushed to master: cdc3737 Fix transparency issues with GTK3 plugins Both issues (background image offset, background image jump) are also present in 4.10 (were they always present or is it a regression?) Also, branch nick/gtk3 is using gtk3 panel and plugins. The plugins (even internal ones) had transparent background issue, which were "fixed" but the workaround in libxfce4-panel.
I'm assuming from the last comment that this issue is fixed for 4.12 onwards. If it is not, please reopen it! If you want to reopen the report to track a backport of the patch on 4.10, please remember to update the milestone.