]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Correctly stack windows when new windows are opened while in fullscreen mode
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 15 Mar 2010 21:17:00 +0000 (22:17 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 15 Mar 2010 21:17:00 +0000 (22:17 +0100)
This fixes ticket #195.

src/manage.c

index b14f73e8f36a420b268bb022aae19fcbab403017..40ef6cca3376c0f102f5c8fcd72c93351a20f1cc 100644 (file)
@@ -400,9 +400,15 @@ void reparent_window(xcb_connection_t *conn, xcb_window_t child,
         if (new->workspace->fullscreen_client != NULL) {
                 DLOG("Setting below fullscreen window\n");
 
-                /* If we are in fullscreen, we should lower the window to not be annoying */
-                uint32_t values[] = { XCB_STACK_MODE_BELOW };
-                xcb_configure_window(conn, new->frame, XCB_CONFIG_WINDOW_STACK_MODE, values);
+                /* If we are in fullscreen, we should place the window below
+                 * the fullscreen window to not be annoying */
+                uint32_t values[] = {
+                        new->workspace->fullscreen_client->frame,
+                        XCB_STACK_MODE_BELOW
+                };
+                xcb_configure_window(conn, new->frame,
+                                     XCB_CONFIG_WINDOW_SIBLING |
+                                     XCB_CONFIG_WINDOW_STACK_MODE, values);
         }
 
         /* Insert into the currently active container, if it’s not a dock window */