GNOME Bugzilla – Bug 710346
Give external developers some way of watching out for the Guard Window
Last modified: 2013-10-17 12:25:51 UTC
The way the code currently is, Mutter creates a "Guard Window" that it hides windows behind so that it can still do things like window previews for minimized windows. And that's fine, but it does so in a pretty inconvenient manner for external tools that have to handle window management while working with the existing window manager: * The window has no title, so we can't filter it out based on title. * The window is the size of the screen rect, so we could theoretically filter on that, but then you get other screen-sized windows that you don't want to filter out. * The window is an override redirect/popup-style window, which confuses our software into thinking it should always be considered. This is bad. We could handle it by checking to see if all of these things are true, but then some random media player comes along and hoses our hack. The most straight forward solution to the problem is to simply set some property on the window that we can look for and filter it out directly. And the easiest one for us to handle is simply naming the window. The one-liner fix would be diff --git a/src/core/screen.c b/src/core/screen.c index 5efc65a..7f69164 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -475,6 +475,7 @@ create_guard_window (Display *xdisplay, MetaScreen *screen) CopyFromParent, /* visual */ CWEventMask|CWOverrideRedirect|CWBackPixel, &attributes); + XStoreName (xdisplay, guard_window, "mutter guard window"); { unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
Out of curiosity, what window management software are you writing?
https://git.gnome.org/browse/mutter/commit/?id=656d079ffcde8b288d7c1d3694178911001e85c8