]> git.sur5r.net Git - i3/i3/commitdiff
Raise clients only relatively to the one which was focused before.
authorMichael Stapelberg <michael+x200@stapelberg.de>
Sat, 2 May 2009 22:23:12 +0000 (00:23 +0200)
committerMichael Stapelberg <michael+x200@stapelberg.de>
Sat, 2 May 2009 22:23:12 +0000 (00:23 +0200)
This should fix ticket #31.

src/layout.c
src/util.c

index a3690ad6d2a9aad4284b4f38a34d9e69bc0376a3..4c18989f0882cb516e90a20f0ba74d9cb1df172b 100644 (file)
@@ -354,11 +354,6 @@ void render_container(xcb_connection_t *conn, Container *container) {
                 /* Reconfigure the currently focused client, if necessary. It is the only visible one */
                 client = container->currently_focused;
 
-                if (container->workspace->fullscreen_client == NULL) {
-                        uint32_t values[] = { XCB_STACK_MODE_ABOVE };
-                        xcb_configure_window(conn, client->frame, XCB_CONFIG_WINDOW_STACK_MODE, values);
-                }
-
                 /* Render the decorations of all clients */
                 CIRCLEQ_FOREACH(client, &(container->clients), clients) {
                         /* If the client is in fullscreen mode, it does not get reconfigured */
index 276f76f92be4cbd6fb6ac3321c19ea884e2c3376..e16fd8474db11a1888a62dccf3097d1c43ebdce8 100644 (file)
@@ -294,6 +294,13 @@ void set_focus(xcb_connection_t *conn, Client *client, bool set_anyways) {
            one than old_client */
         Client *last_focused = get_last_focused_client(conn, client->container, NULL);
 
+        /* In stacking containers, raise the client in respect to the one which was focused before */
+        if (client->container->mode == MODE_STACK && last_focused != NULL) {
+                LOG("raising\n");
+                uint32_t values[] = { last_focused->frame, XCB_STACK_MODE_ABOVE };
+                xcb_configure_window(conn, client->frame, XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE, values);
+        }
+
         /* If it is the same one as old_client, we save us the unnecessary redecorate */
         if ((last_focused != NULL) && (last_focused != old_client))
                 redecorate_window(conn, last_focused);