core: send mouse motion events if motion tracking and button pressed

This commit is contained in:
Mitchell Hashimoto
2023-09-17 11:45:53 -07:00
parent d6b827cce7
commit ab4acf0d00
2 changed files with 28 additions and 11 deletions

View File

@@ -132,6 +132,11 @@ pub const MouseEvents = enum(u3) {
normal = 2, // 1000
button = 3, // 1002
any = 4, // 1003
/// Returns true if this event sends motion events.
pub fn motion(self: MouseEvents) bool {
return self == .button or self == .any;
}
};
/// The format of mouse events when enabled.