aboutsummaryrefslogtreecommitdiff
path: root/i3bar
diff options
context:
space:
mode:
authorOrestis Floros <orestisflo@gmail.com>2020-04-12 15:11:53 +0200
committerOrestis Floros <orestisflo@gmail.com>2020-04-14 20:47:51 +0200
commit7df88f18eb6bc786433433b6a149bb2824377e05 (patch)
treec6f68b12ec0acafd4b1a0e78513588619aa0250d /i3bar
parent4212fb6488578e332a5f3cad2819beedb0ff7ae5 (diff)
downloadi3-7df88f18eb6bc786433433b6a149bb2824377e05.tar.gz
i3-7df88f18eb6bc786433433b6a149bb2824377e05.zip
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
Diffstat (limited to 'i3bar')
-rw-r--r--i3bar/src/xcb.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c
index ae447fbc..ecb41a60 100644
--- a/i3bar/src/xcb.c
+++ b/i3bar/src/xcb.c
@@ -685,19 +685,6 @@ static void handle_visibility_notify(xcb_visibility_notify_event_t *event) {
}
}
-static int strcasecmp_nullable(const char *a, const char *b) {
- if (a == b) {
- return 0;
- }
- if (a == NULL) {
- return -1;
- }
- if (b == NULL) {
- return 1;
- }
- return strcasecmp(a, b);
-}
-
/*
* Comparison function to sort trayclients in ascending alphanumeric order
* according to their class.