glfw: set raw_mouse_motion to true if cursor is disabled

This commit is contained in:
xdBronch 2023-06-03 14:20:22 -04:00 committed by Stephen Gutekanst
parent 100617d449
commit 8e091cec7b

View file

@ -1531,7 +1531,12 @@ pub const InputModeCursor = enum(c_int) {
/// Sets the input mode of the cursor, whether it should behave normally, be hidden, or grabbed. /// Sets the input mode of the cursor, whether it should behave normally, be hidden, or grabbed.
pub inline fn setInputModeCursor(self: Window, value: InputModeCursor) void { pub inline fn setInputModeCursor(self: Window, value: InputModeCursor) void {
return self.setInputMode(InputMode.cursor, value); if (value == .disabled) {
self.setInputMode(.cursor, value);
return self.setInputMode(.raw_mouse_motion, true);
}
self.setInputMode(.cursor, value);
return self.setInputMode(.raw_mouse_motion, false);
} }
/// Gets the current input mode of the cursor. /// Gets the current input mode of the cursor.