diff options
author | Florian Müllner <fmuellner@gnome.org> | 2014-06-24 01:45:15 +0200 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2014-06-24 23:01:59 +0200 |
commit | 048ba353c407c1a77703b3fa99daf9101610a942 (patch) | |
tree | de0e25e99a7b1dbaa0520296df7574fe1136be3e | |
parent | 555e2f6de21eb23750ac571f652db0d7de259265 (diff) | |
download | mutter-048ba353c407c1a77703b3fa99daf9101610a942.tar.gz |
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.
-rw-r--r-- | 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 59efbba6d..963a5ffde 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)); } |