summaryrefslogtreecommitdiffstats
path: root/swaybar
diff options
context:
space:
mode:
authorLibravatar Ian Fan <ianfan0@gmail.com>2018-10-25 12:23:48 +0100
committerLibravatar Ian Fan <ianfan0@gmail.com>2018-10-25 12:57:16 +0100
commitc3fdabb72545302a25a915ae1f76a04cb7f61729 (patch)
treef99ec6724dc49af5724389a9941019ed3777e242 /swaybar
parentMerge pull request #2971 from RyanDwyer/document-output-identifiers (diff)
downloadsway-c3fdabb72545302a25a915ae1f76a04cb7f61729.tar.gz
sway-c3fdabb72545302a25a915ae1f76a04cb7f61729.tar.zst
sway-c3fdabb72545302a25a915ae1f76a04cb7f61729.zip
swaybar: reverse order of workspaces list
This makes it congruent with its visual appearance, making it easier to reason about.
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/input.c2
-rw-r--r--swaybar/ipc.c2
-rw-r--r--swaybar/render.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/swaybar/input.c b/swaybar/input.c
index d0191f51..8e994dcf 100644
--- a/swaybar/input.c
+++ b/swaybar/input.c
@@ -205,7 +205,7 @@ static void wl_pointer_axis(void *data, struct wl_pointer *wl_pointer,
205 205
206 struct swaybar_workspace *new; 206 struct swaybar_workspace *new;
207 207
208 if (amt > 0.0) { 208 if (amt < 0.0) {
209 if (active == first) { 209 if (active == first) {
210 if (!bar->config->wrap_scroll) { 210 if (!bar->config->wrap_scroll) {
211 return; 211 return;
diff --git a/swaybar/ipc.c b/swaybar/ipc.c
index e1b30b52..706f968d 100644
--- a/swaybar/ipc.c
+++ b/swaybar/ipc.c
@@ -307,7 +307,7 @@ bool ipc_get_workspaces(struct swaybar *bar) {
307 if (ws->urgent) { 307 if (ws->urgent) {
308 bar->visible_by_urgency = true; 308 bar->visible_by_urgency = true;
309 } 309 }
310 wl_list_insert(&output->workspaces, &ws->link); 310 wl_list_insert(output->workspaces.prev, &ws->link);
311 } 311 }
312 } 312 }
313 } 313 }
diff --git a/swaybar/render.c b/swaybar/render.c
index 85e7542f..4ebf922e 100644
--- a/swaybar/render.c
+++ b/swaybar/render.c
@@ -466,7 +466,7 @@ static uint32_t render_to_cairo(cairo_t *cairo, struct swaybar_output *output) {
466 x = 0; 466 x = 0;
467 if (config->workspace_buttons) { 467 if (config->workspace_buttons) {
468 struct swaybar_workspace *ws; 468 struct swaybar_workspace *ws;
469 wl_list_for_each_reverse(ws, &output->workspaces, link) { 469 wl_list_for_each(ws, &output->workspaces, link) {
470 uint32_t h = render_workspace_button(cairo, output, ws, &x); 470 uint32_t h = render_workspace_button(cairo, output, ws, &x);
471 max_height = h > max_height ? h : max_height; 471 max_height = h > max_height ? h : max_height;
472 } 472 }