summaryrefslogtreecommitdiffstats
path: root/swaybar/input.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <RedSoxFan@users.noreply.github.com>2018-12-04 23:55:55 -0500
committerLibravatar GitHub <noreply@github.com>2018-12-04 23:55:55 -0500
commit6ccc836ebf282a1ffe5c19fb6ff2e2b55d2f21e6 (patch)
tree97290bcc79a26e09291d87c549afc1cb0392dabd /swaybar/input.c
parentconfig: do not set $XDG_CONFIG_HOME if unset or empty (diff)
parentAdd relative coordinates in JSON for i3bar click events (diff)
downloadsway-6ccc836ebf282a1ffe5c19fb6ff2e2b55d2f21e6.tar.gz
sway-6ccc836ebf282a1ffe5c19fb6ff2e2b55d2f21e6.tar.zst
sway-6ccc836ebf282a1ffe5c19fb6ff2e2b55d2f21e6.zip
Merge pull request #3252 from hvenev/swaybar-rel
Add relative coordinates in JSON for i3bar click events
Diffstat (limited to 'swaybar/input.c')
-rw-r--r--swaybar/input.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/swaybar/input.c b/swaybar/input.c
index 263d0253..1f8491f6 100644
--- a/swaybar/input.c
+++ b/swaybar/input.c
@@ -133,8 +133,8 @@ static void wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
133 && y >= hotspot->y 133 && y >= hotspot->y
134 && x < hotspot->x + hotspot->width 134 && x < hotspot->x + hotspot->width
135 && y < hotspot->y + hotspot->height) { 135 && y < hotspot->y + hotspot->height) {
136 if (HOTSPOT_IGNORE == hotspot->callback(output, pointer->x, pointer->y, 136 if (HOTSPOT_IGNORE == hotspot->callback(output, hotspot,
137 wl_button_to_x11_button(button), hotspot->data)) { 137 pointer->x, pointer->y, wl_button_to_x11_button(button), hotspot->data)) {
138 return; 138 return;
139 } 139 }
140 } 140 }
@@ -166,8 +166,8 @@ static void wl_pointer_axis(void *data, struct wl_pointer *wl_pointer,
166 && y >= hotspot->y 166 && y >= hotspot->y
167 && x < hotspot->x + hotspot->width 167 && x < hotspot->x + hotspot->width
168 && y < hotspot->y + hotspot->height) { 168 && y < hotspot->y + hotspot->height) {
169 if (HOTSPOT_IGNORE == hotspot->callback( 169 if (HOTSPOT_IGNORE == hotspot->callback(output, hotspot,
170 output, pointer->x, pointer->y, button, hotspot->data)) { 170 pointer->x, pointer->y, button, hotspot->data)) {
171 return; 171 return;
172 } 172 }
173 } 173 }