mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 14:21:31 +11:00
On Wayland, fix cursor icon updates on window borders when using CSD (#1322)
* On Wayland, fix cursor icon updates on window borders when using CSD * Move changelog entry to a right place
This commit is contained in:
parent
c1b93fc3d0
commit
3e1d169160
|
@ -1,5 +1,7 @@
|
||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
|
- On Wayland, fix cursor icon updates on window borders when using CSD.
|
||||||
|
|
||||||
# # 0.20.0 Alpha 5 (2019-12-09)
|
# # 0.20.0 Alpha 5 (2019-12-09)
|
||||||
|
|
||||||
- On macOS, fix application termination on `ControlFlow::Exit`
|
- On macOS, fix application termination on `ControlFlow::Exit`
|
||||||
|
|
|
@ -56,6 +56,13 @@ pub fn implement_pointer<T: 'static>(
|
||||||
let wid = store.find_wid(&surface);
|
let wid = store.find_wid(&surface);
|
||||||
if let Some(wid) = wid {
|
if let Some(wid) = wid {
|
||||||
mouse_focus = Some(wid);
|
mouse_focus = Some(wid);
|
||||||
|
|
||||||
|
// Reload cursor style only when we enter winit's surface. Calling
|
||||||
|
// this function every time on `PtrEvent::Enter` could interfere with
|
||||||
|
// SCTK CSD handling, since it changes cursor icons when you hover
|
||||||
|
// cursor over the window borders.
|
||||||
|
cursor_manager.reload_cursor_style();
|
||||||
|
|
||||||
sink.send_window_event(
|
sink.send_window_event(
|
||||||
WindowEvent::CursorEntered {
|
WindowEvent::CursorEntered {
|
||||||
device_id: crate::event::DeviceId(
|
device_id: crate::event::DeviceId(
|
||||||
|
@ -75,8 +82,6 @@ pub fn implement_pointer<T: 'static>(
|
||||||
wid,
|
wid,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
cursor_manager.reload_cursor_style();
|
|
||||||
}
|
}
|
||||||
PtrEvent::Leave { surface, .. } => {
|
PtrEvent::Leave { surface, .. } => {
|
||||||
mouse_focus = None;
|
mouse_focus = None;
|
||||||
|
|
Loading…
Reference in a new issue