]> git.lizzy.rs Git - bspwm.git/commitdiff
Add `ignore_ewmh_struts` config option
authorCosmo Borsky <me@cosmoborsky.com>
Fri, 25 Jan 2019 04:52:08 +0000 (23:52 -0500)
committerBastien Dejean <nihilhill@gmail.com>
Fri, 25 Jan 2019 09:04:48 +0000 (10:04 +0100)
Fixes #906.

contrib/bash_completion
contrib/fish_completion
contrib/zsh_completion
doc/bspwm.1
doc/bspwm.1.asciidoc
src/events.c
src/messages.c
src/settings.h
src/window.c

index 99908075d221b0b802a66135c425c71c65923d60..31a934b99eb917907c12683ce44727323501dfa0 100644 (file)
@@ -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=()
 
index 6bf479fdf942a462b05b17b6e2cd819238315a65..2524ef3d5872f8d42e1f9bedc60bd8e67cc10356 100644 (file)
@@ -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'
index 4e9948ded2d86ae7c5c78d0c8685118693f98d87..903d6d2d7e3bb7c35f3fb5294273917357d68a8c 100644 (file)
@@ -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})
index af49b5027c612da4f5f6d3e004d2bd2e5a4b90fc..fe447ac916e85f92e6ff3f7ad2496df537b2d325 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: bspwm
 .\"    Author: [see the "Author" section]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 01/15/2019
+.\"      Date: 01/24/2019
 .\"    Manual: Bspwm Manual
-.\"    Source: Bspwm 0.9.5-28-g3e7f820
+.\"    Source: Bspwm 0.9.5-31-ga8b40f5
 .\"  Language: English
 .\"
-.TH "BSPWM" "1" "01/15/2019" "Bspwm 0\&.9\&.5\-28\-g3e7f820" "Bspwm Manual"
+.TH "BSPWM" "1" "01/24/2019" "Bspwm 0\&.9\&.5\-31\-ga8b40f5" "Bspwm Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -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
+BIgnore 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
index 058022ab44bf99580ed3c16fdec265380297d5a6..20d9298d8cbdb50598e8e4af26b70e2568952f4f 100644 (file)
@@ -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'.
 
index dc069632b15166ce8c1f89e5e2f2fca6ff898fb3..483d5c8935dc3a69b3fba0e1796d6049277cc3f1 100644 (file)
@@ -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);
index 5d798013168346554166f25ca12aff7efe46c154..07035713051a628b3b3f81529e10fed251a901e2 100644 (file)
@@ -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)
@@ -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)
index b7e9bf7564f6f8e7c6274eb7b0457f009a3c862f..a0f1874b8989f796004dcf185aed0c7116572759 100644 (file)
@@ -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;
index 9461151840d5967e0e6dfa337939ccdc120b7456..6840778a01d35116da7976ad119f92de27ab5095 100644 (file)
@@ -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);
                }