diff --git a/doc/bspwm.1 b/doc/bspwm.1 index 9863c2d5..663465f0 100644 --- a/doc/bspwm.1 +++ b/doc/bspwm.1 @@ -1352,6 +1352,11 @@ Block the fullscreen state transitions that originate from an EWMH request\&. Th Ignore strut hinting from clients requesting to reserve space (i\&.e\&. task bars)\&. .RE .PP +\fIput_dialogs_above\fR +.RS 4 +Put dialogs in the ABOVE stacking layer\&. +.RE +.PP \fIcenter_pseudo_tiled\fR .RS 4 Center pseudo tiled windows into their tiling rectangles\&. Defaults to diff --git a/doc/bspwm.1.asciidoc b/doc/bspwm.1.asciidoc index e84150bf..fe7942f8 100644 --- a/doc/bspwm.1.asciidoc +++ b/doc/bspwm.1.asciidoc @@ -777,6 +777,9 @@ Global Settings 'ignore_ewmh_struts':: Ignore strut hinting from clients requesting to reserve space (i.e. task bars). +'put_dialogs_above':: + Put dialogs in the ABOVE stacking layer. + 'center_pseudo_tiled':: Center pseudo tiled windows into their tiling rectangles. Defaults to 'true'. diff --git a/src/messages.c b/src/messages.c index c3a42014..68180c85 100644 --- a/src/messages.c +++ b/src/messages.c @@ -1738,6 +1738,7 @@ void set_setting(coordinates_t loc, char *name, char *value, FILE *rsp) SET_BOOL(pointer_follows_monitor) SET_BOOL(ignore_ewmh_focus) SET_BOOL(ignore_ewmh_struts) + SET_BOOL(put_dialogs_above) SET_BOOL(center_pseudo_tiled) SET_BOOL(honor_size_hints) SET_BOOL(removal_adjustment) @@ -1869,6 +1870,7 @@ void get_setting(coordinates_t loc, char *name, FILE* rsp) GET_BOOL(pointer_follows_monitor) GET_BOOL(ignore_ewmh_focus) GET_BOOL(ignore_ewmh_struts) + GET_BOOL(put_dialogs_above) GET_BOOL(center_pseudo_tiled) GET_BOOL(honor_size_hints) GET_BOOL(removal_adjustment) diff --git a/src/rule.c b/src/rule.c index 583b2382..6f40af36 100644 --- a/src/rule.c +++ b/src/rule.c @@ -228,6 +228,9 @@ void _apply_window_type(xcb_window_t win, rule_consequence_t *csq) } else if (a == ewmh->_NET_WM_WINDOW_TYPE_DIALOG) { SET_CSQ_STATE(STATE_FLOATING); csq->center = true; + if (put_dialogs_above) { + SET_CSQ_LAYER(LAYER_ABOVE); + } } else if (a == ewmh->_NET_WM_WINDOW_TYPE_DOCK || a == ewmh->_NET_WM_WINDOW_TYPE_DESKTOP || a == ewmh->_NET_WM_WINDOW_TYPE_NOTIFICATION) { diff --git a/src/settings.c b/src/settings.c index 52358f7a..bfe3d819 100644 --- a/src/settings.c +++ b/src/settings.c @@ -65,6 +65,7 @@ bool swallow_first_click; bool ignore_ewmh_focus; bool ignore_ewmh_struts; state_transition_t ignore_ewmh_fullscreen; +bool put_dialogs_above; bool center_pseudo_tiled; bool honor_size_hints; @@ -128,6 +129,7 @@ void load_settings(void) ignore_ewmh_focus = IGNORE_EWMH_FOCUS; ignore_ewmh_fullscreen = IGNORE_EWMH_FULLSCREEN; ignore_ewmh_struts = IGNORE_EWMH_STRUTS; + put_dialogs_above = PUT_DIALOGS_ABOVE; center_pseudo_tiled = CENTER_PSEUDO_TILED; honor_size_hints = HONOR_SIZE_HINTS; diff --git a/src/settings.h b/src/settings.h index 248860d0..f4d9fa78 100644 --- a/src/settings.h +++ b/src/settings.h @@ -59,6 +59,7 @@ #define IGNORE_EWMH_FOCUS false #define IGNORE_EWMH_FULLSCREEN 0 #define IGNORE_EWMH_STRUTS false +#define PUT_DIALOGS_ABOVE false #define CENTER_PSEUDO_TILED true #define HONOR_SIZE_HINTS false @@ -105,6 +106,7 @@ extern bool swallow_first_click; extern bool ignore_ewmh_focus; extern bool ignore_ewmh_struts; extern state_transition_t ignore_ewmh_fullscreen; +extern bool put_dialogs_above; extern bool center_pseudo_tiled; extern bool honor_size_hints;