- * the _NET_CLIENT_LIST_STACKING hint */
- if (stacking_changed)
- ewmh_update_client_list_stacking(btt_stack, btt_stack_num);
+ * the _NET_CLIENT_LIST and _NET_CLIENT_LIST_STACKING hints */
+ if (stacking_changed) {
+ DLOG("Client list changed (%i clients)\n", cnt);
+ ewmh_update_client_list_stacking(client_list_windows, client_list_count);
+
+ walk = client_list_windows;
+
+ /* reorder by initial mapping */
+ TAILQ_FOREACH (state, &initial_mapping_head, initial_mapping_order) {
+ if (con_has_managed_window(state->con))
+ *walk++ = state->con->window->id;
+ }
+
+ ewmh_update_client_list(client_list_windows, client_list_count);
+ }