aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/input.c
diff options
context:
space:
mode:
authorLibravatar Hristo Venev <hristo@venev.name>2018-12-04 12:47:59 +0200
committerLibravatar Hristo Venev <hristo@venev.name>2018-12-04 12:49:21 +0200
commit24e8ba048aef4751c6fa1d5982ee634f921e6cf6 (patch)
tree97290bcc79a26e09291d87c549afc1cb0392dabd /swaybar/input.c
parentconfig: do not set $XDG_CONFIG_HOME if unset or empty (diff)
downloadsway-24e8ba048aef4751c6fa1d5982ee634f921e6cf6.tar.gz
sway-24e8ba048aef4751c6fa1d5982ee634f921e6cf6.tar.zst
sway-24e8ba048aef4751c6fa1d5982ee634f921e6cf6.zip
Add relative coordinates in JSON for i3bar click events
Compatibility with i3 commit 161db6f17d734ac9deb0a20e81b78d4b2a92ce68.
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 }