From: Michael Stapelberg Date: Sat, 27 Mar 2010 03:02:55 +0000 (+0100) Subject: Bugfix: When moving fullscreen floating windows to a different workspace, correctly... X-Git-Tag: 3.e~6^2~20 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ffa388f1946ad2555b62cea5bc2460c546e36fd0;p=i3%2Fi3 Bugfix: When moving fullscreen floating windows to a different workspace, correctly reposition/resize (Thanks Sasha) --- diff --git a/src/commands.c b/src/commands.c index 2d8155f2..c0cb8782 100644 --- a/src/commands.c +++ b/src/commands.c @@ -593,11 +593,16 @@ static void move_floating_window_to_workspace(xcb_connection_t *conn, Client *cl uint32_t relative_x = client->rect.x - old_ws->rect.x, relative_y = client->rect.y - old_ws->rect.y; DLOG("rel_x = %d, rel_y = %d\n", relative_x, relative_y); - client->rect.x = t_ws->rect.x + relative_x; - client->rect.y = t_ws->rect.y + relative_y; - DLOG("after x = %d, y = %d\n", client->rect.x, client->rect.y); - reposition_client(conn, client); - xcb_flush(conn); + if (client->fullscreen) { + client_enter_fullscreen(conn, client, false); + memcpy(&(client->rect), &(t_ws->rect), sizeof(Rect)); + } else { + client->rect.x = t_ws->rect.x + relative_x; + client->rect.y = t_ws->rect.y + relative_y; + DLOG("after x = %d, y = %d\n", client->rect.x, client->rect.y); + reposition_client(conn, client); + xcb_flush(conn); + } } /* Configure the window above all tiling windows (or below a fullscreen