]> git.lizzy.rs Git - bspwm.git/commitdiff
Fix the ordering of the EWMH function calls
authorBastien Dejean <nihilhill@gmail.com>
Sat, 26 Jan 2019 16:20:54 +0000 (17:20 +0100)
committerBastien Dejean <nihilhill@gmail.com>
Sat, 26 Jan 2019 16:20:54 +0000 (17:20 +0100)
First provide the new list of items, then declare the active item.

Fix #911.

src/restore.c
src/window.c

index 7f291f9bf1dc0550bbb10423d64a2905ded8c54c..4ac0ee4e6e0eedb2eab9bf83346a803fbf093c61 100644 (file)
@@ -198,13 +198,13 @@ bool restore_tree(const char *file_path)
                }
        }
 
-       ewmh_update_client_list(false);
-       ewmh_update_client_list(true);
-       ewmh_update_active_window();
        ewmh_update_number_of_desktops();
-       ewmh_update_current_desktop();
        ewmh_update_desktop_names();
        ewmh_update_desktop_viewport();
+       ewmh_update_current_desktop();
+       ewmh_update_client_list(false);
+       ewmh_update_client_list(true);
+       ewmh_update_active_window();
 
        free(tokens);
        free(json);
index 6840778a01d35116da7976ad119f92de27ab5095..35716611a9bef1181b2f895aef70346707397ecc 100644 (file)
@@ -201,6 +201,9 @@ bool manage_window(xcb_window_t win, rule_consequence_t *csq, int fd)
                hide_node(d, n);
        }
 
+       ewmh_update_client_list(false);
+       ewmh_set_wm_desktop(n, d);
+
        if (!csq->hidden && csq->focus) {
                if (d == mon->desk || csq->follow) {
                        focus_node(m, d, n);
@@ -212,8 +215,6 @@ bool manage_window(xcb_window_t win, rule_consequence_t *csq, int fd)
                draw_border(n, false, (m == mon));
        }
 
-       ewmh_set_wm_desktop(n, d);
-       ewmh_update_client_list(false);
        free(csq->layer);
        free(csq->state);