]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Correctly restore focus when leaving fullscreen mode
authorMichael Stapelberg <michael+x200@stapelberg.de>
Sun, 3 May 2009 00:13:11 +0000 (02:13 +0200)
committerMichael Stapelberg <michael+x200@stapelberg.de>
Sun, 3 May 2009 00:13:11 +0000 (02:13 +0200)
debian/changelog
include/xcb.h
src/handlers.c

index 3f48d501ea72adbc53417b667b1b964254f41cf5..f1ec16f5ccd97ceefcc8d1ac7a58dc977ac956d5 100644 (file)
@@ -26,6 +26,9 @@ i3-wm (3.a-bf1-1) unstable; urgency=low
     workspaces.
   * Bugfix: Correctly restart i3 when not using its absolute path
   * Bugfix: Drag & Drop in GTK applications works now
+  * Bugfix: Don't hide non-managed windows (libnotify-popups for example)
+    when raising clients in stacked containers.
+  * Bugfix: Correctly restore focus when leaving fullscreen mode
   * Implement scrolling on stack windows and on the bottom bar.
   * Create i3-wm-dbg with debug symbols
   * Don't rely on libxcb-wm any longer, as it got removed in libxcb 0.3.4.
index 4001cad71ca5a661d153d6a7c0b1956bb1821c3f..c6bb70b2de4b7f2201e39f10b525ccfbd780f045 100644 (file)
@@ -36,6 +36,7 @@
 #define FRAME_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS |          /* …mouse is pressed/released */ \
                           XCB_EVENT_MASK_BUTTON_RELEASE | \
                           XCB_EVENT_MASK_EXPOSURE |              /* …our window needs to be redrawn */ \
+                          XCB_EVENT_MASK_STRUCTURE_NOTIFY |      /* …the frame gets destroyed */ \
                           XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | /* …the application tries to resize itself */ \
                           XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY |   /* …subwindows get notifies */ \
                           XCB_EVENT_MASK_ENTER_WINDOW)           /* …user moves cursor inside our window */
index 0102cb12ac6704747d3f082afafb7716561e881e..150a7516002a138caef3af18a7b24554b664388a 100644 (file)
@@ -595,6 +595,13 @@ int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_noti
         LOG("UnmapNotify for 0x%08x (received from 0x%08x)\n", event->window, event->event);
         if (client == NULL) {
                 LOG("not a managed window. Ignoring.\n");
+
+                /* This was most likely the destroyed frame of a client which is
+                 * currently being unmapped, so we add this sequence (again!) to
+                 * the ignore list (enter_notify events will get sent for both,
+                 * the child and its frame). */
+                add_ignore_event(event->sequence);
+
                 return 0;
         }
 
@@ -617,8 +624,8 @@ int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_noti
                 con->currently_focused = get_last_focused_client(conn, con, NULL);
 
                 /* Only if this is the active container, we need to really change focus */
-                if ((con->currently_focused != NULL) && (con == CUR_CELL))
-                        set_focus(conn, con->currently_focused, false);
+                if ((con->currently_focused != NULL) && ((con == CUR_CELL) || client->fullscreen))
+                        set_focus(conn, con->currently_focused, true);
         }
 
         if (client->dock) {