mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
windows: don't confine hidden cursor
This commit is contained in:
@@ -516,13 +516,6 @@ impl CursorFlags {
|
|||||||
let cy = (client_rect.top + client_rect.bottom) / 2;
|
let cy = (client_rect.top + client_rect.bottom) / 2;
|
||||||
Some(RECT { left: cx, right: cx + 1, top: cy, bottom: cy + 1 })
|
Some(RECT { left: cx, right: cx + 1, top: cy, bottom: cy + 1 })
|
||||||
}
|
}
|
||||||
} else if self.contains(CursorFlags::HIDDEN) {
|
|
||||||
// Confine the cursor to the center of the window if the cursor is hidden.
|
|
||||||
// This avoids problems with the cursor activating
|
|
||||||
// the taskbar if the window borders or overlaps that.
|
|
||||||
let cx = (client_rect.left + client_rect.right) / 2;
|
|
||||||
let cy = (client_rect.top + client_rect.bottom) / 2;
|
|
||||||
Some(RECT { left: cx, right: cx + 1, top: cy, bottom: cy + 1 })
|
|
||||||
} else {
|
} else {
|
||||||
Some(client_rect)
|
Some(client_rect)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ changelog entry.
|
|||||||
- Use `NamedKey`, `Code` and `Location` from the `keyboard-types` v0.8 crate.
|
- Use `NamedKey`, `Code` and `Location` from the `keyboard-types` v0.8 crate.
|
||||||
- Deprecate `Window::set_ime_allowed`, `Window::set_ime_cursor_area`, and `Window::set_ime_purpose`.
|
- Deprecate `Window::set_ime_allowed`, `Window::set_ime_cursor_area`, and `Window::set_ime_purpose`.
|
||||||
- `Force::normalized()` now takes a `Option<ToolAngle>` to calculate the perpendicular force.
|
- `Force::normalized()` now takes a `Option<ToolAngle>` to calculate the perpendicular force.
|
||||||
|
- On Windows, don't confine cursor to center of window when grabbed and hidden.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user