struct Colortriple unfocused;
struct Colortriple urgent;
} bar;
+
+ /** What should happen when a new popup is opened during fullscreen mode */
+ enum {
+ PDF_LEAVE_FULLSCREEN = 0,
+ PDF_IGNORE = 1
+ } popup_during_fullscreen;
};
/**
1pixel { return TOK_1PIXEL; }
focus_follows_mouse { return TOKFOCUSFOLLOWSMOUSE; }
workspace_bar { return TOKWORKSPACEBAR; }
+popup_during_fullscreen { return TOK_POPUP_DURING_FULLSCREEN; }
+ignore { return TOK_IGNORE; }
+leave_fullscreen { return TOK_LEAVE_FULLSCREEN; }
default { /* yylval.number = MODE_DEFAULT; */return TOKCONTAINERMODE; }
stacking { /* yylval.number = MODE_STACK; */return TOKCONTAINERMODE; }
tabbed { /* yylval.number = MODE_TABBED; */return TOKCONTAINERMODE; }
%token TOKWORKSPACEBAR "workspace_bar"
%token TOKCONTAINERMODE "default/stacking/tabbed"
%token TOKSTACKLIMIT "stack-limit"
+%token TOK_POPUP_DURING_FULLSCREEN "popup_during_fullscreen"
+%token TOK_IGNORE "ignore"
+%token TOK_LEAVE_FULLSCREEN "leave_fullscreen"
%%
| terminal
| font
| comment
+ | popup_during_fullscreen
;
comment:
| TOKCONTROL { $<number>$ = BIND_CONTROL; }
| TOKSHIFT { $<number>$ = BIND_SHIFT; }
;
+
+popup_during_fullscreen:
+ TOK_POPUP_DURING_FULLSCREEN WHITESPACE popup_setting
+ {
+ DLOG("popup_during_fullscreen setting: %d\n", $<number>3);
+ config.popup_during_fullscreen = $<number>3;
+ }
+ ;
+
+popup_setting:
+ TOK_IGNORE { $<number>$ = PDF_IGNORE; }
+ | TOK_LEAVE_FULLSCREEN { $<number>$ = PDF_LEAVE_FULLSCREEN; }
+ ;
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;