diff options
Diffstat (limited to 'src/gui/gui.zig')
| -rw-r--r-- | src/gui/gui.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig index e8dc99b9..65b3f926 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -4020,7 +4020,7 @@ fn wheelAt(g: *Gui, in: *Input, w: WheelTurn, mc: MouseCell) void { const WheelTurn = struct { x: f32 = 0, y: f32 = 0, integer_y: i32 = 0, mods: PointerMods = .{} }; /// The modifiers held with a pointer event, as the core's Mouse carries them. -const PointerMods = struct { ctrl: bool = false, shift: bool = false, alt: bool = false }; +const PointerMods = struct { ctrl: bool = false, shift: bool = false, alt: bool = false, super: bool = false }; /// The core's Mouse for an SDL press, release or move over cell `mc`. fn pointerMouse(button: pardes.Mouse.Button, kind: pardes.Mouse.Kind, mc: MouseCell, mods: PointerMods) pardes.Mouse { @@ -4035,12 +4035,13 @@ fn pointerMouse(button: pardes.Mouse.Button, kind: pardes.Mouse.Kind, mc: MouseC .ctrl = mods.ctrl, .shift = mods.shift, .alt = mods.alt, + .super = mods.super, }; } fn pointerMods() PointerMods { const m = c.SDL_GetModState(); - return .{ .ctrl = (m & c.SDL_KMOD_CTRL) != 0, .shift = (m & c.SDL_KMOD_SHIFT) != 0, .alt = (m & c.SDL_KMOD_ALT) != 0 }; + return .{ .ctrl = (m & c.SDL_KMOD_CTRL) != 0, .shift = (m & c.SDL_KMOD_SHIFT) != 0, .alt = (m & c.SDL_KMOD_ALT) != 0, .super = (m & c.SDL_KMOD_GUI) != 0 }; } fn mouseCellWithGeometry(g: *const Gui, core: ?*const pardes.Pardes, x: f32, y: f32, geometry: WindowGeometry) ?MouseCell { |
