Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a setting to automatically put dialogs in the ABOVE stacking layer #1407

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/bspwm.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions doc/bspwm.1.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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'.

Expand Down
2 changes: 2 additions & 0 deletions src/messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/rule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions src/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down