GNOME Bugzilla – Bug 745060
GTK+ theme, shadow border does not work
Last modified: 2016-06-23 14:48:52 UTC
There is at least one bug with GTK+ theme. Adwaita theme has 1px shadow that is used as border: box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.23); This border is not visible. It is rendered by gtk, but it is cut off. In this case frame width and height should be 2px bigger so this shadow border is not cut off.
It looks like problem is only with gnome-terminal...
This also happens with dialog windows, like "zenity --info" for example. It is especially visible in the backdrop case there.
So far most of the cases where I have seen this have been windows the output the following in gnome-terminal: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. One example is tracker-preferences. zenity --info also outputs "Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged." and shows the bug. Perhaps this may give a lead to where the glitch is.
This was actually fixed a while ago ... *** This bug has been marked as a duplicate of bug 752794 ***
Hi Florian. I remember bug 752794. It solved some windows. But this one is a different issue. I have gtk+ 3.20.6 and bug 752794 is fixed. But this one isn't. Please consider reopening.
Florian, did you try zenity dialog? This is still problem with git master.
Created attachment 330250 [details] [review] frames: Don't clip out "invisible" parts of frames The GTK+ theme may draw parts of the decorations outside the actual frame. Since commit f9db65f47f we make sure that the frame is big enough to account for any overdrawing, however as we still clip the cairo context to the actual frame before drawing the decorations, those parts aren't actually painted. This issue is not very obvious for most frames, as they use a non-rgba visual where the unpainted parts appear black, which gives the expected result with many themes once the shape mask is applied (as the mask does include any overdrawn parts). For frames using an rgba visual however, unpainted parts are transparent, so any overdrawn decorations are clearly missing. Fix this by only clipping out the client area when drawing decorations.
Created attachment 330251 [details] [review] frames: "Initialize" frame background Frames are painted on the frame window according to the GTK+ theme. Depending on the target's visual, this means either drawing over a black destination or a fully transparent one. So in cases where the theme doesn't paint decorations with full opacity, decorations for windows with an rgba visual look different from those with a non-rgba visual. Using an rgba visual for all frames independent from the client's visual can potentially break clients, so our only option for a consistent appearance is to explicitly initialize the frame background to black before painting the theme's decoration on top.
It looks perfect now with those patches.
Review of attachment 330251 [details] [review]: ok
Review of attachment 330250 [details] [review]: looks good
Attachment 330250 [details] pushed as c61dfa7 - frames: Don't clip out "invisible" parts of frames Attachment 330251 [details] pushed as a174c18 - frames: "Initialize" frame background