glfw: set raw_mouse_motion to true if cursor is disabled
This commit is contained in:
parent
100617d449
commit
8e091cec7b
1 changed files with 6 additions and 1 deletions
|
@ -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.
|
||||
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.
|
||||
|
|
Loading…
Add table
Reference in a new issue