[mutter] window: Don't make windows on non-primaries sticky on restart



commit 048ba353c407c1a77703b3fa99daf9101610a942
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Jun 24 01:45:15 2014 +0200

    window: Don't make windows on non-primaries sticky on restart
    
    When workspaces-only-on-primary is set, a window can be on all
    workspaces either because it is on a non-primary workspace, or
    because it was explicitly made sticky. Only the latter is reflected
    in _NET_WM_STATE, but both will result in a "magic" _NET_WM_DESKTOP,
    which we (and probably other WMs) use to set the initial sticky state.
    So to avoid confusing other WMs (or ourselves), make sure to only
    have _NET_WM_STATE_STICKY reflected in _NET_WM_DESKTOP when unmanaging.

 src/core/window.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 59efbba..963a5ff 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1275,6 +1275,12 @@ meta_window_unmanage (MetaWindow  *window,
       g_list_free (attached_children);
     }
 
+  /* Make sure to only show window on all workspaces if requested, to
+   * not confuse other window managers that may take over
+   */
+  if (window->screen->closing && meta_prefs_get_workspaces_only_on_primary ())
+    meta_window_update_on_all_workspaces (window);
+
   if (window->fullscreen)
     {
       MetaGroup *group;
@@ -1405,6 +1411,7 @@ should_be_on_all_workspaces (MetaWindow *window)
     window->on_all_workspaces_requested ||
     window->override_redirect ||
     (meta_prefs_get_workspaces_only_on_primary () &&
+     !window->unmanaging &&
      !meta_window_is_on_primary_monitor (window));
 }
 


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