diff options
Diffstat (limited to 'swaybar/render.c')
-rw-r--r-- | swaybar/render.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index 2ebd338e..d210e25a 100644 --- a/swaybar/render.c +++ b/swaybar/render.c | |||
@@ -109,7 +109,7 @@ static void render_sharp_line(cairo_t *cairo, uint32_t color, | |||
109 | } | 109 | } |
110 | 110 | ||
111 | static void block_hotspot_callback(struct swaybar_output *output, | 111 | static void block_hotspot_callback(struct swaybar_output *output, |
112 | int x, int y, uint32_t button, void *data) { | 112 | int x, int y, enum x11_button button, void *data) { |
113 | struct i3bar_block *block = data; | 113 | struct i3bar_block *block = data; |
114 | struct status_line *status = output->bar->status; | 114 | struct status_line *status = output->bar->status; |
115 | i3bar_block_send_click(status, block, x, y, button); | 115 | i3bar_block_send_click(status, block, x, y, button); |
@@ -349,7 +349,7 @@ static const char *strip_workspace_number(const char *ws_name) { | |||
349 | } | 349 | } |
350 | 350 | ||
351 | static void workspace_hotspot_callback(struct swaybar_output *output, | 351 | static void workspace_hotspot_callback(struct swaybar_output *output, |
352 | int x, int y, uint32_t button, void *data) { | 352 | int x, int y, enum x11_button button, void *data) { |
353 | ipc_send_workspace_command(output->bar, (const char *)data); | 353 | ipc_send_workspace_command(output->bar, (const char *)data); |
354 | } | 354 | } |
355 | 355 | ||
@@ -503,6 +503,9 @@ void render_frame(struct swaybar *bar, struct swaybar_output *output) { | |||
503 | output->buffers, | 503 | output->buffers, |
504 | output->width * output->scale, | 504 | output->width * output->scale, |
505 | output->height * output->scale); | 505 | output->height * output->scale); |
506 | if (!output->current_buffer) { | ||
507 | return; | ||
508 | } | ||
506 | cairo_t *shm = output->current_buffer->cairo; | 509 | cairo_t *shm = output->current_buffer->cairo; |
507 | 510 | ||
508 | cairo_save(shm); | 511 | cairo_save(shm); |