]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: configure floating windows above tiling windows when moving them to another...
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 16 Mar 2010 23:36:08 +0000 (00:36 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 16 Mar 2010 23:39:38 +0000 (00:39 +0100)
src/commands.c

index d60de2c1d43e8475cc2435fda9f601959571449b..56f1ab27cb567f4cc967c5a32b8846b2b0fe8ea3 100644 (file)
@@ -560,6 +560,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);
+                }
+        }
+
         LOG("done\n");
 
         render_layout(conn);