mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 05:41:31 +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,12 +690,16 @@ impl WindowState {
|
|||
pub fn set_cursor_visible(&mut self, cursor_visible: bool) {
|
||||
self.cursor_visible = cursor_visible;
|
||||
|
||||
for pointer in self.pointers.iter().filter_map(|pointer| pointer.upgrade()) {
|
||||
let latest_enter_serial = pointer.pointer().winit_data().latest_enter_serial();
|
||||
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();
|
||||
|
||||
pointer
|
||||
.pointer()
|
||||
.set_cursor(latest_enter_serial, None, 0, 0);
|
||||
pointer
|
||||
.pointer()
|
||||
.set_cursor(latest_enter_serial, None, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue