]> git.lizzy.rs Git - bspwm.git/commitdiff
Remove `apply_floating_atom` setting
authorBastien Dejean <nihilhill@gmail.com>
Fri, 13 Nov 2015 11:10:39 +0000 (12:10 +0100)
committerBastien Dejean <nihilhill@gmail.com>
Fri, 13 Nov 2015 11:10:39 +0000 (12:10 +0100)
It is trivial to emulate this setting by subscribing to events.

bspwm.c
bspwm.h
contrib/bash_completion
contrib/zsh_completion
doc/bspwm.1
doc/bspwm.1.txt
messages.c
settings.c
settings.h
window.c
window.h

diff --git a/bspwm.c b/bspwm.c
index 519b3882b290db99e0891e0e80f3a81fef971155..152fc30bb1a748094d2d7512f839365f3515a045 100644 (file)
--- a/bspwm.c
+++ b/bspwm.c
@@ -269,7 +269,6 @@ void setup(void)
        get_atom(#a, &a);
        GETATOM(WM_DELETE_WINDOW)
        GETATOM(WM_TAKE_FOCUS)
-       GETATOM(_BSPWM_FLOATING_WINDOW)
 #undef GETATOM
 
        const xcb_query_extension_reply_t *qep = xcb_get_extension_data(dpy, &xcb_randr_id);
diff --git a/bspwm.h b/bspwm.h
index 6d2924535972fc1485e2ed696a9f3483a4e25183..2c8748731c8a081bd56755c3596b9ba6b4ae6960 100644 (file)
--- a/bspwm.h
+++ b/bspwm.h
@@ -66,7 +66,6 @@ xcb_window_t meta_window;
 xcb_window_t motion_recorder;
 xcb_atom_t WM_TAKE_FOCUS;
 xcb_atom_t WM_DELETE_WINDOW;
-xcb_atom_t _BSPWM_FLOATING_WINDOW;
 int exit_status;
 
 bool visible;
index 027c5873a9c40291d5258f894f578091224d0d7d..b3c82751de47be073d3a2589bba17cf752e9bf89 100644 (file)
@@ -1,7 +1,7 @@
 _bspc() {
        local commands='window desktop monitor query pointer rule restore control config quit'
 
-       local settings='external_rules_command status_prefix focused_border_color active_border_color normal_border_color presel_border_color focused_locked_border_color active_locked_border_color normal_locked_border_color focused_sticky_border_color normal_sticky_border_color focused_private_border_color active_private_border_color normal_private_border_color urgent_border_color border_width window_gap top_padding right_padding bottom_padding left_padding split_ratio initial_polarity borderless_monocle gapless_monocle leaf_monocle focus_follows_pointer pointer_follows_focus pointer_follows_monitor apply_floating_atom auto_alternate auto_cancel history_aware_focus focus_by_distance ignore_ewmh_focus center_pseudo_tiled remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
+       local settings='external_rules_command status_prefix focused_border_color active_border_color normal_border_color presel_border_color focused_locked_border_color active_locked_border_color normal_locked_border_color focused_sticky_border_color normal_sticky_border_color focused_private_border_color active_private_border_color normal_private_border_color urgent_border_color border_width window_gap top_padding right_padding bottom_padding left_padding split_ratio initial_polarity borderless_monocle gapless_monocle leaf_monocle focus_follows_pointer pointer_follows_focus pointer_follows_monitor auto_alternate auto_cancel history_aware_focus focus_by_distance ignore_ewmh_focus center_pseudo_tiled remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors'
 
        COMPREPLY=()
 
index 04b886bb1116b1cc85b329074b73df56edf77145..b2d0a49bbc0a20f9b2963b2ce65ba5c5aa05f92a 100644 (file)
@@ -3,7 +3,7 @@
 _bspc() {
        local -a commands settings
        commands=('window' 'desktop' 'monitor' 'query' 'pointer' 'rule' 'restore' 'control' 'config' 'quit')
-       settings=('external_rules_command' 'status_prefix' 'focused_border_color' 'active_border_color' 'normal_border_color' 'presel_border_color' 'focused_locked_border_color' 'active_locked_border_color' 'normal_locked_border_color' 'focused_sticky_border_color' 'normal_sticky_border_color' 'focused_private_border_color' 'active_private_border_color' 'normal_private_border_color' 'urgent_border_color' 'border_width' 'window_gap' 'top_padding' 'right_padding' 'bottom_padding' 'left_padding' 'split_ratio' 'initial_polarity' 'borderless_monocle' 'gapless_monocle' 'leaf_monocle' 'focus_follows_pointer' 'pointer_follows_focus' 'pointer_follows_monitor' 'apply_floating_atom' 'auto_alternate' 'auto_cancel' 'history_aware_focus' 'focus_by_distance' 'ignore_ewmh_focus' 'center_pseudo_tiled' 'remove_disabled_monitors' 'remove_unplugged_monitors' 'merge_overlapping_monitors')
+       settings=('external_rules_command' 'status_prefix' 'focused_border_color' 'active_border_color' 'normal_border_color' 'presel_border_color' 'focused_locked_border_color' 'active_locked_border_color' 'normal_locked_border_color' 'focused_sticky_border_color' 'normal_sticky_border_color' 'focused_private_border_color' 'active_private_border_color' 'normal_private_border_color' 'urgent_border_color' 'border_width' 'window_gap' 'top_padding' 'right_padding' 'bottom_padding' 'left_padding' 'split_ratio' 'initial_polarity' 'borderless_monocle' 'gapless_monocle' 'leaf_monocle' 'focus_follows_pointer' 'pointer_follows_focus' 'pointer_follows_monitor' 'auto_alternate' 'auto_cancel' 'history_aware_focus' 'focus_by_distance' 'ignore_ewmh_focus' 'center_pseudo_tiled' 'remove_disabled_monitors' 'remove_unplugged_monitors' 'merge_overlapping_monitors')
        if (( CURRENT == 2 )) ; then
                _values 'command' "$commands[@]"
        elif (( CURRENT == 3 )) ; then
index 7f2f67f036c0da511c6314bb87fae571887c5bc3..32eafdff595a16533ad6278e09750b8146959771 100644 (file)
@@ -1269,13 +1269,6 @@ arguments as
 option\&.
 .RE
 .PP
-\fIapply_floating_atom\fR
-.RS 4
-Set the value of the
-\fI_BSPWM_FLOATING_WINDOW\fR
-atom of each window according to its floating state\&.
-.RE
-.PP
 \fIignore_ewmh_focus\fR
 .RS 4
 Ignore EWMH focus requests coming from applications\&.
index b5bd4d2c40709fcaeac451fbed1a2adf698b7b1b..0a841cb582cf40e66b15fa056488e181a1cd19b8 100644 (file)
@@ -772,9 +772,6 @@ Global Settings
 'auto_cancel'::
        Interpret consecutive identical *--presel* arguments as *--cancel-presel* option.
 
-'apply_floating_atom'::
-       Set the value of the '_BSPWM_FLOATING_WINDOW' atom of each window according to its floating state.
-
 'ignore_ewmh_focus'::
        Ignore EWMH focus requests coming from applications.
 
index e9b70cdebed39d2fde77c8169191ab7bee3c549d..c9f461be95825e35c742e01dcd3190d3890a93cc 100644 (file)
@@ -1044,7 +1044,6 @@ int set_setting(coordinates_t loc, char *name, char *value)
                SETBOOL(leaf_monocle)
                SETBOOL(pointer_follows_focus)
                SETBOOL(pointer_follows_monitor)
-               SETBOOL(apply_floating_atom)
                SETBOOL(auto_alternate)
                SETBOOL(auto_cancel)
                SETBOOL(history_aware_focus)
@@ -1134,7 +1133,6 @@ int get_setting(coordinates_t loc, char *name, FILE* rsp)
        GETBOOL(focus_follows_pointer)
        GETBOOL(pointer_follows_focus)
        GETBOOL(pointer_follows_monitor)
-       GETBOOL(apply_floating_atom)
        GETBOOL(auto_alternate)
        GETBOOL(auto_cancel)
        GETBOOL(history_aware_focus)
index c20f3d714606db424f493a7ea8f6a24a2cf527f2..9c3639609fde9daf7f549a988d9bbde23452bf5c 100644 (file)
@@ -68,7 +68,6 @@ void load_settings(void)
        focus_follows_pointer = FOCUS_FOLLOWS_POINTER;
        pointer_follows_focus = POINTER_FOLLOWS_FOCUS;
        pointer_follows_monitor = POINTER_FOLLOWS_MONITOR;
-       apply_floating_atom = APPLY_FLOATING_ATOM;
        auto_alternate = AUTO_ALTERNATE;
        auto_cancel = AUTO_CANCEL;
        history_aware_focus = HISTORY_AWARE_FOCUS;
index 8608b768d9020ce610b6390e457a5cea95c673d4..b58dac8ef0971484bcff9bfc2e0a1398210e76ca 100644 (file)
@@ -62,7 +62,6 @@
 #define POINTER_FOLLOWS_MONITOR     false
 #define AUTO_ALTERNATE              false
 #define AUTO_CANCEL                 false
-#define APPLY_FLOATING_ATOM         false
 #define IGNORE_EWMH_FOCUS           false
 #define CENTER_PSEUDO_TILED         true
 #define REMOVE_DISABLED_MONITORS    false
@@ -98,7 +97,6 @@ bool leaf_monocle;
 bool focus_follows_pointer;
 bool pointer_follows_focus;
 bool pointer_follows_monitor;
-bool apply_floating_atom;
 bool auto_alternate;
 bool auto_cancel;
 bool history_aware_focus;
index 0d01f7c0b8591e8fb488ec76dc8ca59c6d78ef6e..ce00809c8368faf72b08ff2a2e10739259a91d33 100644 (file)
--- a/window.c
+++ b/window.c
@@ -74,7 +74,6 @@ void manage_window(xcb_window_t win, rule_consequence_t *csq, int fd)
        if (!csq->manage) {
                free(csq->layer);
                free(csq->state);
-               disable_floating_atom(win);
                window_show(win);
                return;
        }
@@ -157,7 +156,6 @@ void manage_window(xcb_window_t win, rule_consequence_t *csq, int fd)
                c->layer = *(csq->layer);
        }
 
-       disable_floating_atom(c->window);
        set_state(m, d, n, csq->state != NULL ? *(csq->state) : c->state);
        set_locked(m, d, n, csq->locked);
        set_sticky(m, d, n, csq->sticky);
@@ -453,17 +451,13 @@ void set_floating(monitor_t *m, desktop_t *d, node_t *n, bool value)
                return;
        }
 
-       client_t *c = n->client;
-
        n->split_mode = MODE_AUTOMATIC;
        n->vacant = value;
        update_vacant_state(n->parent);
 
        if (value) {
-               enable_floating_atom(c->window);
                unrotate_brother(n);
        } else {
-               disable_floating_atom(c->window);
                rotate_brother(n);
                if (d->focus == n) {
                        neutralize_obscuring_windows(m, d, n);
@@ -578,23 +572,6 @@ void set_urgency(monitor_t *m, desktop_t *d, node_t *n, bool value)
        put_status(SBSC_MASK_REPORT);
 }
 
-void set_floating_atom(xcb_window_t win, uint32_t value)
-{
-       if (!apply_floating_atom)
-               return;
-       set_atom(win, _BSPWM_FLOATING_WINDOW, value);
-}
-
-void enable_floating_atom(xcb_window_t win)
-{
-       set_floating_atom(win, 1);
-}
-
-void disable_floating_atom(xcb_window_t win)
-{
-       set_floating_atom(win, 0);
-}
-
 uint32_t get_border_color(client_t *c, bool focused_window, bool focused_monitor)
 {
        if (c == NULL)
index 1e55947f338671a0b748a7cff58de04335d27f8c..7c030ee0474fc19ae035a0499be3995c3dd78ffc 100644 (file)
--- a/window.h
+++ b/window.h
@@ -51,9 +51,6 @@ void set_locked(monitor_t *m, desktop_t *d, node_t *n, bool value);
 void set_sticky(monitor_t *m, desktop_t *d, node_t *n, bool value);
 void set_private(monitor_t *m, desktop_t *d, node_t *n, bool value);
 void set_urgency(monitor_t *m, desktop_t *d, node_t *n, bool value);
-void set_floating_atom(xcb_window_t win, uint32_t value);
-void enable_floating_atom(xcb_window_t win);
-void disable_floating_atom(xcb_window_t win);
 uint32_t get_border_color(client_t *c, bool focused_window, bool focused_monitor);
 void update_floating_rectangle(client_t *c);
 void restrain_floating_width(client_t *c, int *width);