summaryrefslogtreecommitdiffstats
path: root/swaybar/render.c
diff options
context:
space:
mode:
Diffstat (limited to 'swaybar/render.c')
-rw-r--r--swaybar/render.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/swaybar/render.c b/swaybar/render.c
index 7cbcea07..670e8e74 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>
@@ -126,13 +127,13 @@ static void render_sharp_line(cairo_t *cairo, uint32_t color,
126 } 127 }
127} 128}
128 129
129static enum hotspot_event_handling block_hotspot_callback(struct swaybar_output *output, 130static enum hotspot_event_handling block_hotspot_callback(
130 struct swaybar_hotspot *hotspot, 131 struct swaybar_output *output, struct swaybar_hotspot *hotspot,
131 int x, int y, enum x11_button button, void *data) { 132 int x, int y, uint32_t button, void *data) {
132 struct i3bar_block *block = data; 133 struct i3bar_block *block = data;
133 struct status_line *status = output->bar->status; 134 struct status_line *status = output->bar->status;
134 return i3bar_block_send_click(status, block, x, y, x - hotspot->x, y - hotspot->y, 135 return i3bar_block_send_click(status, block, x, y, x - hotspot->x,
135 hotspot->width, hotspot->height, button); 136 y - hotspot->y, hotspot->width, hotspot->height, button);
136} 137}
137 138
138static void i3bar_block_unref_callback(void *data) { 139static void i3bar_block_unref_callback(void *data) {
@@ -360,10 +361,10 @@ static uint32_t render_binding_mode_indicator(cairo_t *cairo,
360 return output->height; 361 return output->height;
361} 362}
362 363
363static enum hotspot_event_handling workspace_hotspot_callback(struct swaybar_output *output, 364static enum hotspot_event_handling workspace_hotspot_callback(
364 struct swaybar_hotspot *hotspot, 365 struct swaybar_output *output, struct swaybar_hotspot *hotspot,
365 int x, int y, enum x11_button button, void *data) { 366 int x, int y, uint32_t button, void *data) {
366 if (button != LEFT) { 367 if (button != BTN_LEFT) {
367 return HOTSPOT_PROCESS; 368 return HOTSPOT_PROCESS;
368 } 369 }
369 ipc_send_workspace_command(output->bar, (const char *)data); 370 ipc_send_workspace_command(output->bar, (const char *)data);