Eat scroll event if a key binding function is executed because of it.
When an axis (scroll) event results in a key binding function
being executed, eat the scroll event so the underlying window
doesn't receive it.
Thanks to Scott Moreau for helping me solve this.
diff --git a/src/compositor.c b/src/compositor.c
index eeb57f9..6ea8af5 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1859,10 +1859,11 @@
weston_compositor_wake(compositor);
- if (value)
- weston_compositor_run_axis_binding(compositor, seat,
- time, axis, value);
- else
+ if (!value)
+ return;
+
+ if (weston_compositor_run_axis_binding(compositor, seat,
+ time, axis, value))
return;
if (pointer->focus_resource)