From eca5955e6568dd7144881617bd90d5415f1de895 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 7 Aug 2023 14:35:52 -0700 Subject: [PATCH] apprt/gtk: new input mods format --- src/apprt/gtk.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apprt/gtk.zig b/src/apprt/gtk.zig index 2871e7f06..4c3471979 100644 --- a/src/apprt/gtk.zig +++ b/src/apprt/gtk.zig @@ -1230,10 +1230,10 @@ fn translateMouseButton(button: c.guint) input.MouseButton { fn translateMods(state: c.GdkModifierType) input.Mods { var mods: input.Mods = .{}; - if (state & c.GDK_SHIFT_MASK != 0) mods.shift = true; - if (state & c.GDK_CONTROL_MASK != 0) mods.ctrl = true; - if (state & c.GDK_ALT_MASK != 0) mods.alt = true; - if (state & c.GDK_SUPER_MASK != 0) mods.super = true; + if (state & c.GDK_SHIFT_MASK != 0) mods.shift = .both; + if (state & c.GDK_CONTROL_MASK != 0) mods.ctrl = .both; + if (state & c.GDK_ALT_MASK != 0) mods.alt = .both; + if (state & c.GDK_SUPER_MASK != 0) mods.super = .both; // Lock is dependent on the X settings but we just assume caps lock. if (state & c.GDK_LOCK_MASK != 0) mods.caps_lock = true;