From c0bbe1e23d6f966de9fc6d939fd510eb8800f310 Mon Sep 17 00:00:00 2001 From: flysand7 Date: Sun, 12 Nov 2023 21:09:41 +1100 Subject: [PATCH] [vendor/x11]: Add a special type for mouse events --- vendor/x11/xlib/xlib_const.odin | 8 ++++++++ vendor/x11/xlib/xlib_types.odin | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/vendor/x11/xlib/xlib_const.odin b/vendor/x11/xlib/xlib_const.odin index 5c3579a8c..a37cee64c 100644 --- a/vendor/x11/xlib/xlib_const.odin +++ b/vendor/x11/xlib/xlib_const.odin @@ -68,6 +68,14 @@ BackingStore :: enum i32 { Always = 2, } +MouseButton :: enum i32 { + Button1 = 1, + Button2 = 2, + Button3 = 3, + Button4 = 4, + Button5 = 5, +} + EventMask :: bit_set[EventMaskBits; int] EventMaskBits :: enum i32 { KeyPress = 0, diff --git a/vendor/x11/xlib/xlib_types.odin b/vendor/x11/xlib/xlib_types.odin index bb2f16604..3cee181c8 100644 --- a/vendor/x11/xlib/xlib_types.odin +++ b/vendor/x11/xlib/xlib_types.odin @@ -335,7 +335,7 @@ XButtonEvent :: struct { x_root: i32, y_root: i32, state: InputMask, - button: u32, + button: MouseButton, same_screen: b32, }