[metacity] Ignore adding a window if it's already present



commit a5a0420bfff31afa1834008bc7c015d9ea06fcb4
Author: hordepfo <hordepfo gmail com>
Date:   Tue May 27 21:53:17 2014 +0100

    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).

 src/compositor/compositor-xrender.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
index 118a0d9..3d4565f 100644
--- a/src/compositor/compositor-xrender.c
+++ b/src/compositor/compositor-xrender.c
@@ -1817,6 +1817,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;
   cw->window = window;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]