summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/out/wayland_common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 4afd4c0999..fe9c0b531c 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -141,14 +141,16 @@ static int get_mods(struct vo_wayland_state *wl)
MP_KEY_MODIFIER_META,
};
+ int modifiers = 0;
+
for (int n = 0; n < MP_ARRAY_SIZE(mods); n++) {
xkb_mod_index_t index = xkb_keymap_mod_get_index(wl->xkb_keymap, mod_names[n]);
if (!xkb_state_mod_index_is_consumed(wl->xkb_state, wl->keyboard_code, index)
&& xkb_state_mod_index_is_active(wl->xkb_state, index,
XKB_STATE_MODS_DEPRESSED))
- return mods[n];
+ modifiers |= mods[n];
}
- return 0;
+ return modifiers;
}
static void pointer_handle_enter(void *data, struct wl_pointer *pointer,