From 3b59f5829f6ef46b15fb869e6a63d2835f41da13 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 12 Sep 2009 18:18:41 +0200 Subject: [PATCH] Bugfix: Correctly initialize workspaces for floating clients, too --- src/commands.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/commands.c b/src/commands.c index 66ac3e50..bb867809 100644 --- a/src/commands.c +++ b/src/commands.c @@ -511,18 +511,13 @@ static void move_floating_window_to_workspace(xcb_connection_t *conn, Client *cl LOG("moving floating\n"); - if (t_ws->screen == NULL) { - LOG("initializing new workspace, setting num to %d\n", workspace-1); - t_ws->screen = c_ws->screen; - /* Copy the dimensions from the virtual screen */ - memcpy(&(t_ws->rect), &(t_ws->screen->rect), sizeof(Rect)); - } else { - /* Check if there is already a fullscreen client on the destination workspace and - * stop moving if so. */ - if (client->fullscreen && (t_ws->fullscreen_client != NULL)) { - LOG("Not moving: Fullscreen client already existing on destination workspace.\n"); - return; - } + workspace_initialize(t_ws, container->workspace->screen); + + /* Check if there is already a fullscreen client on the destination workspace and + * stop moving if so. */ + if (client->fullscreen && (t_ws->fullscreen_client != NULL)) { + LOG("Not moving: Fullscreen client already existing on destination workspace.\n"); + return; } floating_assign_to_workspace(client, t_ws);