summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/wayland_common.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 2a3cb8a57e..413e26bbb5 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -253,19 +253,20 @@ static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer,
{
struct vo_wayland_state *wl = data;
+ int mpmod = get_mods(wl);
double val = wl_fixed_to_double(value) < 0 ? -1 : 1;
switch (axis) {
case WL_POINTER_AXIS_VERTICAL_SCROLL:
if (value > 0)
- mp_input_put_wheel(wl->vo->input_ctx, MP_WHEEL_DOWN, +val);
+ mp_input_put_wheel(wl->vo->input_ctx, MP_WHEEL_DOWN | mpmod, +val);
if (value < 0)
- mp_input_put_wheel(wl->vo->input_ctx, MP_WHEEL_UP, -val);
+ mp_input_put_wheel(wl->vo->input_ctx, MP_WHEEL_UP | mpmod, -val);
break;
case WL_POINTER_AXIS_HORIZONTAL_SCROLL:
if (value > 0)
- mp_input_put_wheel(wl->vo->input_ctx, MP_WHEEL_RIGHT, +val);
+ mp_input_put_wheel(wl->vo->input_ctx, MP_WHEEL_RIGHT | mpmod, +val);
if (value < 0)
- mp_input_put_wheel(wl->vo->input_ctx, MP_WHEEL_LEFT, -val);
+ mp_input_put_wheel(wl->vo->input_ctx, MP_WHEEL_LEFT | mpmod, -val);
break;
}
}