diff options
Diffstat (limited to 'swaybar/bar.c')
-rw-r--r-- | swaybar/bar.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c index 94bc48bc..62a7727e 100644 --- a/swaybar/bar.c +++ b/swaybar/bar.c @@ -146,8 +146,10 @@ static void wl_pointer_button(void *data, struct wl_pointer *wl_pointer, && y >= hotspot->y && x < hotspot->x + hotspot->width && y < hotspot->y + hotspot->height) { - hotspot->callback(output, pointer->x, pointer->y, - wl_button_to_x11_button(button), hotspot->data); + if (HOTSPOT_IGNORE == hotspot->callback(output, pointer->x, pointer->y, + wl_button_to_x11_button(button), hotspot->data)) { + return; + } } } } @@ -169,9 +171,11 @@ static void wl_pointer_axis(void *data, struct wl_pointer *wl_pointer, && y >= hotspot->y && x < hotspot->x + hotspot->width && y < hotspot->y + hotspot->height) { - hotspot->callback(output, pointer->x, pointer->y, - wl_axis_to_x11_button(axis, value), hotspot->data); - return; + if (HOTSPOT_IGNORE == hotspot->callback( + output, pointer->x, pointer->y, + wl_axis_to_x11_button(axis, value), hotspot->data)) { + return; + } } } |