mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
window: Be more careful when setting initial workspace state
A window may either be sticky because it has been requested as such, or because it is placed on a non-primary monitor (and the corresponding preference is set). While we do take the latter into account, we currently override the sticky state later during initialization; be a bit more careful there to get the initial state right. https://bugzilla.gnome.org/show_bug.cgi?id=737178
This commit is contained in:
parent
8ff4597201
commit
2eec11b445
@ -1062,8 +1062,8 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
|
||||
if (window->initial_workspace_set)
|
||||
{
|
||||
gboolean on_all_workspaces;
|
||||
MetaWorkspace *workspace;
|
||||
gboolean on_all_workspaces = window->on_all_workspaces;
|
||||
MetaWorkspace *workspace = NULL;
|
||||
|
||||
if (window->initial_workspace == (int) 0xFFFFFFFF)
|
||||
{
|
||||
@ -1077,15 +1077,13 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
window->on_all_workspaces_requested = TRUE;
|
||||
|
||||
on_all_workspaces = TRUE;
|
||||
workspace = NULL;
|
||||
}
|
||||
else
|
||||
else if (!on_all_workspaces)
|
||||
{
|
||||
meta_topic (META_DEBUG_PLACEMENT,
|
||||
"Window %s is initially on space %d\n",
|
||||
window->desc, window->initial_workspace);
|
||||
|
||||
on_all_workspaces = FALSE;
|
||||
workspace = meta_screen_get_workspace_by_index (window->screen,
|
||||
window->initial_workspace);
|
||||
}
|
||||
@ -1112,7 +1110,7 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
window->transient_for->workspace);
|
||||
}
|
||||
|
||||
if (window->workspace == NULL)
|
||||
if (window->workspace == NULL && !window->on_all_workspaces)
|
||||
{
|
||||
meta_topic (META_DEBUG_PLACEMENT,
|
||||
"Putting window %s on active workspace\n",
|
||||
|
Loading…
Reference in New Issue
Block a user