Sort dock clients by class and instance
This is similar to #3820 but does not use qsort but an insertion sort in con_attach. Since each bar block automatically gets its own incremental bar id, bards end up being sorted according to their definition order in the config file. For i3bar, the WM_CLASS is modified to include an instance name which depends on the bar_id. This could be useful for other reason, e.g. users targeting a specific bar instance. Fixes #3491
This commit is contained in:
@ -1147,9 +1147,7 @@ static bool handle_strut_partial_change(Con *con, xcb_get_property_reply_t *prop
|
||||
|
||||
/* attach the dock to the dock area */
|
||||
con_detach(con);
|
||||
con->parent = dockarea;
|
||||
TAILQ_INSERT_HEAD(&(dockarea->focus_head), con, focused);
|
||||
TAILQ_INSERT_HEAD(&(dockarea->nodes_head), con, nodes);
|
||||
con_attach(con, dockarea, true);
|
||||
|
||||
tree_render();
|
||||
|
||||
|
Reference in New Issue
Block a user