Skip to content

Commit

Permalink
Add ignore_ewmh_struts config option
Browse files Browse the repository at this point in the history
  • Loading branch information
MyNameIsCosmo committed Jan 25, 2019
1 parent 644b200 commit a8b40f5
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contrib/bash_completion
@@ -1,7 +1,7 @@
_bspc() {
local commands='node desktop monitor query rule wm subscribe config quit'

local settings='external_rules_command status_prefix normal_border_color active_border_color focused_border_color presel_feedback_color border_width window_gap top_padding right_padding bottom_padding left_padding top_monocle_padding right_monocle_padding bottom_monocle_padding left_monocle_padding split_ratio automatic_scheme removal_adjustment initial_polarity directional_focus_tightness borderless_monocle gapless_monocle single_monocle pointer_motion_interval pointer_modifier pointer_action1 pointer_action2 pointer_action3 click_to_focus swallow_first_click focus_follows_pointer pointer_follows_focus pointer_follows_monitor mapping_events_count ignore_ewmh_focus ignore_ewmh_fullscreen center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
local settings='external_rules_command status_prefix normal_border_color active_border_color focused_border_color presel_feedback_color border_width window_gap top_padding right_padding bottom_padding left_padding top_monocle_padding right_monocle_padding bottom_monocle_padding left_monocle_padding split_ratio automatic_scheme removal_adjustment initial_polarity directional_focus_tightness borderless_monocle gapless_monocle single_monocle pointer_motion_interval pointer_modifier pointer_action1 pointer_action2 pointer_action3 click_to_focus swallow_first_click focus_follows_pointer pointer_follows_focus pointer_follows_monitor mapping_events_count ignore_ewmh_focus ignore_ewmh_fullscreen ignore_ewmh_struts center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'

COMPREPLY=()

Expand Down
2 changes: 1 addition & 1 deletion contrib/fish_completion
Expand Up @@ -11,4 +11,4 @@ function __fish_bspc_using_command
end

complete -f -c bspc -n '__fish_bspc_needs_command' -a 'node desktop monitor query rule wm subscribe config quit'
complete -f -c bspc -n '__fish_bspc_using_command config' -a 'external_rules_command status_prefix normal_border_color active_border_color focused_border_color presel_feedback_color border_width window_gap top_padding right_padding bottom_padding left_padding top_monocle_padding right_monocle_padding bottom_monocle_padding left_monocle_padding split_ratio automatic_scheme removal_adjustment initial_polarity directional_focus_tightness borderless_monocle gapless_monocle single_monocle pointer_motion_interval pointer_modifier pointer_action1 pointer_action2 pointer_action3 click_to_focus swallow_first_click focus_follows_pointer pointer_follows_focus pointer_follows_monitor mapping_events_count ignore_ewmh_focus ignore_ewmh_fullscreen center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
complete -f -c bspc -n '__fish_bspc_using_command config' -a 'external_rules_command status_prefix normal_border_color active_border_color focused_border_color presel_feedback_color border_width window_gap top_padding right_padding bottom_padding left_padding top_monocle_padding right_monocle_padding bottom_monocle_padding left_monocle_padding split_ratio automatic_scheme removal_adjustment initial_polarity directional_focus_tightness borderless_monocle gapless_monocle single_monocle pointer_motion_interval pointer_modifier pointer_action1 pointer_action2 pointer_action3 click_to_focus swallow_first_click focus_follows_pointer pointer_follows_focus pointer_follows_monitor mapping_events_count ignore_ewmh_focus ignore_ewmh_fullscreen ignore_ewmh_struts center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
2 changes: 1 addition & 1 deletion contrib/zsh_completion
Expand Up @@ -317,7 +317,7 @@ _bspc() {
local -a {look,behaviour,input}{_bool,}
look_bool=(borderless_monocle gapless_monocle)
look=({normal,active,focused}_border_color {top,right,bottom,left}_padding {top,right,bottom,left}_monocle_padding presel_feedback_color border_width window_gap)
behaviour_bool=(single_monocle removal_adjustment ignore_ewmh_focus center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors)
behaviour_bool=(single_monocle removal_adjustment ignore_ewmh_focus ignore_ewmh_struts center_pseudo_tiled honor_size_hints remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors)
behaviour=(mapping_events_count ignore_ewmh_fullscreen external_rules_command split_ratio automatic_scheme initial_polarity directional_focus_tightness status_prefix)
input_bool=(swallow_first_click focus_follows_pointer pointer_follows_{focus,monitor})
input=(click_to_focus pointer_motion_interval pointer_modifier pointer_action{1,2,3})
Expand Down
5 changes: 5 additions & 0 deletions doc/bspwm.1
Expand Up @@ -1300,6 +1300,11 @@ Block the fullscreen state transitions that originate from an EWMH request\&. Th
\fBexit\fR\&.
.RE
.PP
\fIignore_ewmh_struts\fR
.RS 4
Ignore strut hinting from clients requesting to reserve space (i.e. task bars)\&.
.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
Expand Up @@ -746,6 +746,9 @@ Global Settings
'ignore_ewmh_fullscreen'::
Block the fullscreen state transitions that originate from an EWMH request. The possible values are: *none*, *all*, or a comma separated list of the following values: *enter*, *exit*.
'ignore_ewmh_struts'::
BIgnore strut hinting from clients requesting to reserve space (i.e. task bars).
'center_pseudo_tiled'::
Center pseudo tiled windows into their tiling rectangles. Defaults to 'true'.
Expand Down
2 changes: 1 addition & 1 deletion src/events.c
Expand Up @@ -260,7 +260,7 @@ void property_notify(xcb_generic_event_t *evt)
{
xcb_property_notify_event_t *e = (xcb_property_notify_event_t *) evt;

if (e->atom == ewmh->_NET_WM_STRUT_PARTIAL && ewmh_handle_struts(e->window)) {
if (!ignore_ewmh_struts && e->atom == ewmh->_NET_WM_STRUT_PARTIAL && ewmh_handle_struts(e->window)) {
for (monitor_t *m = mon_head; m != NULL; m = m->next) {
for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
arrange(m, d);
Expand Down
2 changes: 2 additions & 0 deletions src/messages.c
Expand Up @@ -1673,6 +1673,7 @@ void set_setting(coordinates_t loc, char *name, char *value, FILE *rsp)
SET_BOOL(pointer_follows_focus)
SET_BOOL(pointer_follows_monitor)
SET_BOOL(ignore_ewmh_focus)
SET_BOOL(ignore_ewmh_struts)
SET_BOOL(center_pseudo_tiled)
SET_BOOL(honor_size_hints)
SET_BOOL(removal_adjustment)
Expand Down Expand Up @@ -1801,6 +1802,7 @@ void get_setting(coordinates_t loc, char *name, FILE* rsp)
GET_BOOL(pointer_follows_focus)
GET_BOOL(pointer_follows_monitor)
GET_BOOL(ignore_ewmh_focus)
GET_BOOL(ignore_ewmh_struts)
GET_BOOL(center_pseudo_tiled)
GET_BOOL(honor_size_hints)
GET_BOOL(removal_adjustment)
Expand Down
1 change: 1 addition & 0 deletions src/settings.h
Expand Up @@ -98,6 +98,7 @@ bool pointer_follows_monitor;
int8_t click_to_focus;
bool swallow_first_click;
bool ignore_ewmh_focus;
bool ignore_ewmh_struts;
state_transition_t ignore_ewmh_fullscreen;

bool center_pseudo_tiled;
Expand Down
2 changes: 1 addition & 1 deletion src/window.c
Expand Up @@ -78,7 +78,7 @@ bool manage_window(xcb_window_t win, rule_consequence_t *csq, int fd)

parse_rule_consequence(fd, csq);

if (ewmh_handle_struts(win)) {
if (!ignore_ewmh_struts && ewmh_handle_struts(win)) {
for (monitor_t *m = mon_head; m != NULL; m = m->next) {
arrange(m, m->desk);
}
Expand Down

0 comments on commit a8b40f5

Please sign in to comment.