Bugfix: Correctly restore focus when leaving fullscreen mode

This commit is contained in:
Michael Stapelberg 2009-05-03 02:13:11 +02:00
parent 95f4085bcd
commit eab895ac9e
3 changed files with 13 additions and 2 deletions

3
debian/changelog vendored
View File

@ -26,6 +26,9 @@ i3-wm (3.a-bf1-1) unstable; urgency=low
workspaces. workspaces.
* Bugfix: Correctly restart i3 when not using its absolute path * Bugfix: Correctly restart i3 when not using its absolute path
* Bugfix: Drag & Drop in GTK applications works now * 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. * Implement scrolling on stack windows and on the bottom bar.
* Create i3-wm-dbg with debug symbols * Create i3-wm-dbg with debug symbols
* Don't rely on libxcb-wm any longer, as it got removed in libxcb 0.3.4. * Don't rely on libxcb-wm any longer, as it got removed in libxcb 0.3.4.

View File

@ -36,6 +36,7 @@
#define FRAME_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS | /* …mouse is pressed/released */ \ #define FRAME_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS | /* …mouse is pressed/released */ \
XCB_EVENT_MASK_BUTTON_RELEASE | \ XCB_EVENT_MASK_BUTTON_RELEASE | \
XCB_EVENT_MASK_EXPOSURE | /* …our window needs to be redrawn */ \ 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_REDIRECT | /* …the application tries to resize itself */ \
XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | /* …subwindows get notifies */ \ XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | /* …subwindows get notifies */ \
XCB_EVENT_MASK_ENTER_WINDOW) /* …user moves cursor inside our window */ XCB_EVENT_MASK_ENTER_WINDOW) /* …user moves cursor inside our window */

View 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); LOG("UnmapNotify for 0x%08x (received from 0x%08x)\n", event->window, event->event);
if (client == NULL) { if (client == NULL) {
LOG("not a managed window. Ignoring.\n"); 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; 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); con->currently_focused = get_last_focused_client(conn, con, NULL);
/* Only if this is the active container, we need to really change focus */ /* Only if this is the active container, we need to really change focus */
if ((con->currently_focused != NULL) && (con == CUR_CELL)) if ((con->currently_focused != NULL) && ((con == CUR_CELL) || client->fullscreen))
set_focus(conn, con->currently_focused, false); set_focus(conn, con->currently_focused, true);
} }
if (client->dock) { if (client->dock) {