[mutter] window: Don't map the client window before placing it



commit 604d2155ba7a2a227f3cc7efda1314c9a28fa0ce
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Sep 1 11:44:48 2014 -0700

    window: Don't map the client window before placing it
    
    A lot of applications assume that the window is fully positioned when it
    gets the MapNotify, especially simple applications. Make sure that the
    window is only mapped through the calc_showing logic.

 src/core/window.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 351b74a..2436a76 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1157,9 +1157,6 @@ _meta_window_shared_new (MetaDisplay         *display,
   /* disable show desktop mode unless we're a desktop component */
   maybe_leave_show_desktop_mode (window);
 
-  if (!window->override_redirect)
-    sync_client_window_mapped (window);
-
   meta_window_queue (window, META_QUEUE_CALC_SHOWING);
   /* See bug 303284; a transient of the given window can already exist, in which
    * case we think it should probably be shown.
@@ -1523,9 +1520,6 @@ implement_showing (MetaWindow *window,
   meta_verbose ("Implement showing = %d for window %s\n",
                 showing, window->desc);
 
-  if (!window->override_redirect)
-    sync_client_window_mapped (window);
-
   if (!showing)
     {
       /* When we manage a new window, we normally delay placing it
@@ -1541,6 +1535,9 @@ implement_showing (MetaWindow *window,
     }
   else
     meta_window_show (window);
+
+  if (!window->override_redirect)
+    sync_client_window_mapped (window);
 }
 
 static void


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