diff options
Diffstat (limited to 'swaybar/render.c')
-rw-r--r-- | swaybar/render.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index 12dd3b07..55f680ed 100644 --- a/swaybar/render.c +++ b/swaybar/render.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #define _POSIX_C_SOURCE 200809L | 1 | #define _POSIX_C_SOURCE 200809L |
2 | #include <assert.h> | 2 | #include <assert.h> |
3 | #include <linux/input-event-codes.h> | ||
3 | #include <limits.h> | 4 | #include <limits.h> |
4 | #include <stdlib.h> | 5 | #include <stdlib.h> |
5 | #include <stdint.h> | 6 | #include <stdint.h> |
@@ -129,13 +130,13 @@ static void render_sharp_line(cairo_t *cairo, uint32_t color, | |||
129 | } | 130 | } |
130 | } | 131 | } |
131 | 132 | ||
132 | static enum hotspot_event_handling block_hotspot_callback(struct swaybar_output *output, | 133 | static enum hotspot_event_handling block_hotspot_callback( |
133 | struct swaybar_hotspot *hotspot, | 134 | struct swaybar_output *output, struct swaybar_hotspot *hotspot, |
134 | int x, int y, enum x11_button button, void *data) { | 135 | int x, int y, uint32_t button, void *data) { |
135 | struct i3bar_block *block = data; | 136 | struct i3bar_block *block = data; |
136 | struct status_line *status = output->bar->status; | 137 | struct status_line *status = output->bar->status; |
137 | return i3bar_block_send_click(status, block, x, y, x - hotspot->x, y - hotspot->y, | 138 | return i3bar_block_send_click(status, block, x, y, x - hotspot->x, |
138 | hotspot->width, hotspot->height, button); | 139 | y - hotspot->y, hotspot->width, hotspot->height, button); |
139 | } | 140 | } |
140 | 141 | ||
141 | static void i3bar_block_unref_callback(void *data) { | 142 | static void i3bar_block_unref_callback(void *data) { |
@@ -366,10 +367,10 @@ static uint32_t render_binding_mode_indicator(cairo_t *cairo, | |||
366 | return output->height; | 367 | return output->height; |
367 | } | 368 | } |
368 | 369 | ||
369 | static enum hotspot_event_handling workspace_hotspot_callback(struct swaybar_output *output, | 370 | static enum hotspot_event_handling workspace_hotspot_callback( |
370 | struct swaybar_hotspot *hotspot, | 371 | struct swaybar_output *output, struct swaybar_hotspot *hotspot, |
371 | int x, int y, enum x11_button button, void *data) { | 372 | int x, int y, uint32_t button, void *data) { |
372 | if (button != LEFT) { | 373 | if (button != BTN_LEFT) { |
373 | return HOTSPOT_PROCESS; | 374 | return HOTSPOT_PROCESS; |
374 | } | 375 | } |
375 | ipc_send_workspace_command(output->bar, (const char *)data); | 376 | ipc_send_workspace_command(output->bar, (const char *)data); |