summaryrefslogtreecommitdiffstats
path: root/swaybar
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-04-08 10:03:22 -0400
committerLibravatar GitHub <noreply@github.com>2018-04-08 10:03:22 -0400
commitbd236b658787aedd3bb33a10cb558486fbc56d6d (patch)
treedd53f3dd8276598b36d5fbf23458d5781931b62b /swaybar
parentMerge pull request #1772 from bpinto/feature/improve-dependency-check (diff)
parentUse full ws->name in swaybar hotspot callback (diff)
downloadsway-bd236b658787aedd3bb33a10cb558486fbc56d6d.tar.gz
sway-bd236b658787aedd3bb33a10cb558486fbc56d6d.tar.zst
sway-bd236b658787aedd3bb33a10cb558486fbc56d6d.zip
Merge pull request #1773 from thejan2009/issue/swaybar-mouse
Use full ws->name in swaybar hotspot callback
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/render.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/swaybar/render.c b/swaybar/render.c
index 53e578f0..1c24e01f 100644
--- a/swaybar/render.c
+++ b/swaybar/render.c
@@ -352,6 +352,7 @@ static uint32_t render_workspace_button(cairo_t *cairo,
352 struct swaybar_output *output, struct swaybar_config *config, 352 struct swaybar_output *output, struct swaybar_config *config,
353 struct swaybar_workspace *ws, double *x, uint32_t surface_height) { 353 struct swaybar_workspace *ws, double *x, uint32_t surface_height) {
354 const char *name = ws->name; 354 const char *name = ws->name;
355 const char *whole_name = ws->name;
355 if (config->strip_workspace_numbers) { 356 if (config->strip_workspace_numbers) {
356 name = strip_workspace_number(ws->name); 357 name = strip_workspace_number(ws->name);
357 } 358 }
@@ -411,7 +412,7 @@ static uint32_t render_workspace_button(cairo_t *cairo,
411 hotspot->height = height; 412 hotspot->height = height;
412 hotspot->callback = workspace_hotspot_callback; 413 hotspot->callback = workspace_hotspot_callback;
413 hotspot->destroy = free; 414 hotspot->destroy = free;
414 hotspot->data = strdup(name); 415 hotspot->data = strdup(whole_name);
415 wl_list_insert(&output->hotspots, &hotspot->link); 416 wl_list_insert(&output->hotspots, &hotspot->link);
416 417
417 *x += width; 418 *x += width;