summaryrefslogtreecommitdiffstats
path: root/swaybar/bar.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-07-20 11:45:47 -0400
committerLibravatar GitHub <noreply@github.com>2018-07-20 11:45:47 -0400
commitb642d47c7f1f61993edd20200298fe971f636bbb (patch)
treebec87e642ae380995b5addc12624b83600489a60 /swaybar/bar.c
parentMerge pull request #2316 from RyanDwyer/fix-floating-pointer-events (diff)
parentswaybar: Fix scroll handling on workspace buttons (diff)
downloadsway-b642d47c7f1f61993edd20200298fe971f636bbb.tar.gz
sway-b642d47c7f1f61993edd20200298fe971f636bbb.tar.zst
sway-b642d47c7f1f61993edd20200298fe971f636bbb.zip
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.c14
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,
146 && y >= hotspot->y 146 && y >= hotspot->y
147 && x < hotspot->x + hotspot->width 147 && x < hotspot->x + hotspot->width
148 && y < hotspot->y + hotspot->height) { 148 && y < hotspot->y + hotspot->height) {
149 hotspot->callback(output, pointer->x, pointer->y, 149 if (HOTSPOT_IGNORE == hotspot->callback(output, pointer->x, pointer->y,
150 wl_button_to_x11_button(button), hotspot->data); 150 wl_button_to_x11_button(button), hotspot->data)) {
151 return;
152 }
151 } 153 }
152 } 154 }
153} 155}
@@ -169,9 +171,11 @@ static void wl_pointer_axis(void *data, struct wl_pointer *wl_pointer,
169 && y >= hotspot->y 171 && y >= hotspot->y
170 && x < hotspot->x + hotspot->width 172 && x < hotspot->x + hotspot->width
171 && y < hotspot->y + hotspot->height) { 173 && y < hotspot->y + hotspot->height) {
172 hotspot->callback(output, pointer->x, pointer->y, 174 if (HOTSPOT_IGNORE == hotspot->callback(
173 wl_axis_to_x11_button(axis, value), hotspot->data); 175 output, pointer->x, pointer->y,
174 return; 176 wl_axis_to_x11_button(axis, value), hotspot->data)) {
177 return;
178 }
175 } 179 }
176 } 180 }
177 181