]> git.sur5r.net Git - i3/i3/commitdiff
Don’t set focus outside of the current container
authorMichael Stapelberg <michael+x200@stapelberg.de>
Fri, 6 Mar 2009 16:13:20 +0000 (17:13 +0100)
committerMichael Stapelberg <michael+x200@stapelberg.de>
Fri, 6 Mar 2009 16:13:20 +0000 (17:13 +0100)
src/handlers.c

index dce8fd799ff12f588e80e42e20520db6a0e2af3f..939fe63659188ddc3c46db140a83defd79676cbc 100644 (file)
@@ -456,12 +456,9 @@ int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_noti
                 SLIST_FOREACH(focus_client, &(con->workspace->focus_stack), focus_clients)
                         if (focus_client->container == con) {
                                 con->currently_focused = focus_client;
+                                set_focus(conn, focus_client);
                                 break;
                         }
-
-                /* Actually set focus, if there is a window which should get it */
-                if (!SLIST_EMPTY(&(con->workspace->focus_stack)))
-                        set_focus(conn, SLIST_FIRST(&(con->workspace->focus_stack)));
         }
 
         LOG("child of 0x%08x.\n", client->frame);