Implement smart popup_during_fullscreen mode

With this commit, the default behavior is to display popups while there
is a fullscreen application only if the popup belongs to that
application (as determined by the WM_TRANSIENT_FOR hint which
applications have to set properly).

fixes #663
This commit is contained in:
Michael Stapelberg
2012-10-24 19:59:09 +02:00
parent 29b19a7468
commit 9b87b2c8ec
5 changed files with 44 additions and 18 deletions

View File

@ -347,6 +347,12 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
fs != NULL) {
LOG("There is a fullscreen window, leaving fullscreen mode\n");
con_toggle_fullscreen(fs, CF_OUTPUT);
} else if (config.popup_during_fullscreen == PDF_SMART &&
fs != NULL &&
fs->window != NULL &&
fs->window->id == cwindow->transient_for) {
LOG("This floating window belongs to the fullscreen window (popup_during_fullscreen == smart)\n");
con_focus(nc);
}
}