Windows: CursorState improvements (#526)
* Windows: CursorState improvements Fixes #523 Prior to changing the cursor state, we now check the current grab state, since it can be invalidated by alt-tabbing and other things. `CursorState::Hide` is also implemented now. The cursor name is now wrapped in a `Cursor` struct to allow multithreaded access. `Window::set_cursor_state` has been reworked to use `execute_in_thread`. Two unneeded `transmute` calls were also removed. The `WM_SETCURSOR` handler is much more readable now. `MonitorId::get_adapter_name` has been removed, since it's dead code and appears to be a relic from 4 years ago. * Windows: CursorState::Grab no longer hides cursor `MouseCursor::NoneCursor` has been implemented to allow for equivalent behavior to the older implementation. Windows and X11 now have consistent cursor grabbing behavior. macOS still needs to be updated. * Windows: Grabbing auto-hides again (for now) This API needs more work, so let's stick to a bug fix and some refactoring. However, it now hides using a different technique than it did originally, which applies instantly instead of after mouse movement.
This commit is contained in:
parent
fddfb2e2d6
commit
f6d26df64d
6 changed files with 125 additions and 83 deletions
|
|
@ -17,6 +17,9 @@
|
|||
- Added the `Window::set_ime_spot(x: i32, y: i32)` method, which is implemented on X11 and macOS.
|
||||
- **Breaking**: `os::unix::WindowExt::send_xim_spot(x: i16, y: i16)` no longer exists. Switch to the new `Window::set_ime_spot(x: i32, y: i32)`, which has equivalent functionality.
|
||||
- Fixed detection of `Pause` and `Scroll` keys on Windows.
|
||||
- On Windows, alt-tabbing while the cursor is grabbed no longer makes it impossible to re-grab the window.
|
||||
- On Windows, using `CursorState::Hide` when the cursor is grabbed now ungrabs the cursor first.
|
||||
- Implemented `MouseCursor::NoneCursor` on Windows.
|
||||
|
||||
# Version 0.14.0 (2018-05-09)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue