mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 13:51:30 +11:00
On Wayland, fix Window::set_cursor_visible(true)
Making the cursor back visible was simply forgotten and it was
always hiding instead.
Fixes: 2496098890
(Update wayland-rs to 0.30.0)
Fixes: #2820.
This commit is contained in:
parent
3c3be71a77
commit
f3f46cb3f6
|
@ -690,6 +690,9 @@ impl WindowState {
|
|||
pub fn set_cursor_visible(&mut self, cursor_visible: bool) {
|
||||
self.cursor_visible = cursor_visible;
|
||||
|
||||
if self.cursor_visible {
|
||||
self.set_cursor(self.cursor_icon);
|
||||
} else {
|
||||
for pointer in self.pointers.iter().filter_map(|pointer| pointer.upgrade()) {
|
||||
let latest_enter_serial = pointer.pointer().winit_data().latest_enter_serial();
|
||||
|
||||
|
@ -698,6 +701,7 @@ impl WindowState {
|
|||
.set_cursor(latest_enter_serial, None, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether show or hide client side decorations.
|
||||
#[inline]
|
||||
|
|
Loading…
Reference in a new issue