aboutsummaryrefslogtreecommitdiff
path: root/swaybar/render.c
diff options
context:
space:
mode:
authorRyan Dwyer <RyanDwyer@users.noreply.github.com>2018-07-18 09:32:03 +1000
committerGitHub <noreply@github.com>2018-07-18 09:32:03 +1000
commit8ce7e3b44eea0a270ecc35a9da2ae801aaf6bce1 (patch)
tree6badffb0c6ee33b4e23e914c4c9f9b39a625b5f3 /swaybar/render.c
parent621d2666b1ac214c63628bbe0ac8f5d6485cb501 (diff)
parent48b911a4596f50b585a1073d32413236d9defb60 (diff)
downloadsway-8ce7e3b44eea0a270ecc35a9da2ae801aaf6bce1.tar.xz
Merge branch 'master' into destroy-output-destroy-empty-workspaces
Diffstat (limited to 'swaybar/render.c')
-rw-r--r--swaybar/render.c7
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,
}
static void block_hotspot_callback(struct swaybar_output *output,
- int x, int y, uint32_t button, void *data) {
+ int x, int y, enum x11_button button, void *data) {
struct i3bar_block *block = data;
struct status_line *status = output->bar->status;
i3bar_block_send_click(status, block, x, y, button);
@@ -349,7 +349,7 @@ static const char *strip_workspace_number(const char *ws_name) {
}
static void workspace_hotspot_callback(struct swaybar_output *output,
- int x, int y, uint32_t button, void *data) {
+ int x, int y, enum x11_button button, void *data) {
ipc_send_workspace_command(output->bar, (const char *)data);
}
@@ -503,6 +503,9 @@ void render_frame(struct swaybar *bar, struct swaybar_output *output) {
output->buffers,
output->width * output->scale,
output->height * output->scale);
+ if (!output->current_buffer) {
+ return;
+ }
cairo_t *shm = output->current_buffer->cairo;
cairo_save(shm);