Comment 13 for bug 1107850

Revision history for this message
In , Karlt (karlt) wrote :

Created attachment 673078
use ParentRelative background pixmap to avoid effects from shapes GDK applies to child windows during Show

Given the window manager is drawing the frame before we respond to the
ConfigureNotify event, we might as well give in and let the background be
drawn on Show.

This would be quite the wrong thing for translucent windows, as the shape
would be wrong until we paint. However, we only make override-redirect
windows transparent and GDK handles override-redirect windows differently,
resizing synchronously and temporarily setting the background to None during
show to suppress display of the background.

This patch is perhaps a simple quick fix, but we can do a better fix.

Using ParentRelative makes child Windows look just like their parent Window's
background until they are drawn. This seems to look a little better than
setting background None on the toplevel, which leads to the window manager
frame painting while there still seems to be a big gap in the middle.

ParentRelative has the additional requirement that the parent window needs to
have matching depth. Usually our child windows inherit the colormap/visual
from the parent and so that is satisfied. That inheritance doesn't guarantee
the same depth when windows are reparented. The only toplevel windows that we
give different depths are popup windows, so that would only be a problem if we
had windowed plugins in a popup. However, I'm not sure that styles/themes can't set different visuals on different widgets, which would be a problem to solve when reparenting to the GtkInvisible widget.