From: Michael Stapelberg Date: Tue, 16 Mar 2010 23:36:08 +0000 (+0100) Subject: Bugfix: configure floating windows above tiling windows when moving them to another... X-Git-Tag: 3.e~6^2~61 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b47d0a89327da6c06c38b0c7252e140b8c5f0013;p=i3%2Fi3 Bugfix: configure floating windows above tiling windows when moving them to another workspaces (Thanks Sasha) --- diff --git a/src/commands.c b/src/commands.c index 273f9d39..6276ac19 100644 --- a/src/commands.c +++ b/src/commands.c @@ -600,6 +600,22 @@ static void move_floating_window_to_workspace(xcb_connection_t *conn, Client *cl xcb_flush(conn); } + /* Configure the window above all tiling windows (or below a fullscreen + * window, if any) */ + if (t_ws->fullscreen_client != NULL) { + uint32_t values[] = { t_ws->fullscreen_client->frame, XCB_STACK_MODE_BELOW }; + xcb_configure_window(conn, client->frame, XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE, values); + } else { + Client *last_tiling; + SLIST_FOREACH(last_tiling, &(t_ws->focus_stack), focus_clients) + if (!client_is_floating(last_tiling)) + break; + if (last_tiling != SLIST_END(&(t_ws->focus_stack))) { + uint32_t values[] = { last_tiling->frame, XCB_STACK_MODE_ABOVE }; + xcb_configure_window(conn, client->frame, XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE, values); + } + } + DLOG("done\n"); render_layout(conn);