summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhordepfo <[email protected]>2014-05-27 21:53:17 +0100
committerhordepfo <[email protected]>2014-05-27 21:53:17 +0100
commit064f1ff4d56da2d0fc6b9cce674c667c5d3c7ec4 (patch)
tree437d1884cb6b430568b2a842aaf1907bafe34116
parent86de83b061a4ff0901e563db3671180c79abf007 (diff)
downloadmarco-064f1ff4d56da2d0fc6b9cce674c667c5d3c7ec4.tar.bz2
marco-064f1ff4d56da2d0fc6b9cce674c667c5d3c7ec4.tar.xz
Ignore adding a window if it's already present
If a window is added and it's already in the compositor's window list, then it won't be added again. This was causing strange behaviour in the compositor (windows and panels disappearing).
-rw-r--r--src/compositor/compositor-xrender.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
index 805002e3..6294e9d7 100644
--- a/src/compositor/compositor-xrender.c
+++ b/src/compositor/compositor-xrender.c
@@ -1821,6 +1821,10 @@ add_win (MetaScreen *screen,
if (xwindow == info->output)
return;
+
+ /* If already added, ignore */
+ if (find_window_for_screen (screen, xwindow) != NULL)
+ return;
cw = g_new0 (MetaCompWindow, 1);
cw->screen = screen;