window: Fix another case of uninitialized workspace state

Since commit 2eec11b445, windows without a __NET_WM_DESKTOP property
that should be on all workspaces are not added to the active workspace;
this is correct, however not adding them to any workspace is not ...
This commit is contained in:
Florian Müllner 2014-09-26 11:39:31 +01:00
parent f3595ebd08
commit d06b39d13c

View File

@ -1097,9 +1097,9 @@ _meta_window_shared_new (MetaDisplay *display,
* but appear on other workspaces. override-redirect windows are part
* of no workspace.
*/
if (!window->override_redirect)
if (!window->override_redirect && window->workspace == NULL)
{
if (window->workspace == NULL && window->transient_for != NULL)
if (window->transient_for != NULL)
{
meta_topic (META_DEBUG_PLACEMENT,
"Putting window %s on same workspace as parent %s\n",
@ -1110,7 +1110,15 @@ _meta_window_shared_new (MetaDisplay *display,
window->transient_for->workspace);
}
if (window->workspace == NULL && !window->on_all_workspaces)
if (window->on_all_workspaces)
{
meta_topic (META_DEBUG_PLACEMENT,
"Putting window %s on all workspaces\n",
window->desc);
set_workspace_state (window, TRUE, NULL);
}
else
{
meta_topic (META_DEBUG_PLACEMENT,
"Putting window %s on active workspace\n",