Implement the popup_during_fullscreen option, set default to leave_fullscreen

Fixes #333
This commit is contained in:
Michael Stapelberg
2011-03-06 15:45:42 +01:00
parent 51ff0f80a6
commit 7154fecbbf
4 changed files with 38 additions and 1 deletions

View File

@ -247,9 +247,20 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
if (cwindow->transient_for != XCB_NONE ||
(cwindow->leader != XCB_NONE &&
cwindow->leader != cwindow->id &&
con_by_window_id(cwindow->leader) != NULL))
con_by_window_id(cwindow->leader) != NULL)) {
LOG("This window is transiert for another window, setting floating\n");
want_floating = true;
if (config.popup_during_fullscreen == PDF_LEAVE_FULLSCREEN) {
Con *ws = con_get_workspace(nc);
Con *fs = con_get_fullscreen_con(ws);
if (fs != NULL) {
LOG("There is a fullscreen window, leaving fullscreen mode\n");
con_toggle_fullscreen(fs);
}
}
}
/* dock clients cannot be floating, that makes no sense */
if (cwindow->dock)
want_floating = false;