diff options
| author | Drew DeVault <sir@cmpwn.com> | 2018-07-20 11:45:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-20 11:45:47 -0400 |
| commit | b642d47c7f1f61993edd20200298fe971f636bbb (patch) | |
| tree | bec87e642ae380995b5addc12624b83600489a60 /swaybar/bar.c | |
| parent | 0a0b676f6457c0272264e9f0e9435a15b50d999b (diff) | |
| parent | bfcfabee2b7e6bd820929a3cb86c4981a6385ac7 (diff) | |
Merge pull request #2313 from minus7/swaybar-hotspot-input-fix
swaybar: Fix scroll handling on workspace buttons
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; + } } } |
