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:
Kirill Chibisov 2019-12-18 16:41:44 +03:00 committed by Freya Gentz
parent c1b93fc3d0
commit 3e1d169160
2 changed files with 9 additions and 2 deletions

View file

@ -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`

View file

@ -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;