From a6f0dcd2501c7e79694c3e7ff60d330496c76ad3 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 8 Jan 2011 12:03:03 +0100 Subject: [PATCH] Fix switching to a workspace on a different output --- src/workspace.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/workspace.c b/src/workspace.c index 0694b977..a1e653ea 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -211,14 +211,17 @@ void workspace_show(const char *num) { current->fullscreen_mode = CF_NONE; } + /* Check if the the currently focused con is on the same Output as the + * workspace we chose as 'old'. If not, use the workspace of the currently + * focused con */ + if (con_get_workspace(focused)->parent != old->parent) + old = con_get_workspace(focused); + /* enable fullscreen for the target workspace. If it happens to be the * same one we are currently on anyways, we can stop here. */ workspace->fullscreen_mode = CF_OUTPUT; if (workspace == old) return; - /* disable fullscreen */ - TAILQ_FOREACH(current, &(workspace->parent->nodes_head), nodes) - current->fullscreen_mode = CF_NONE; workspace_reassign_sticky(workspace); -- 2.39.5