Skip to content

Commit 3e1d169

Browse files
kchibisovgoddessfreya
authored andcommitted
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
1 parent c1b93fc commit 3e1d169

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Unreleased
22

3+
- On Wayland, fix cursor icon updates on window borders when using CSD.
4+
35
# # 0.20.0 Alpha 5 (2019-12-09)
46

57
- On macOS, fix application termination on `ControlFlow::Exit`

src/platform_impl/linux/wayland/pointer.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ pub fn implement_pointer<T: 'static>(
5656
let wid = store.find_wid(&surface);
5757
if let Some(wid) = wid {
5858
mouse_focus = Some(wid);
59+
60+
// Reload cursor style only when we enter winit's surface. Calling
61+
// this function every time on `PtrEvent::Enter` could interfere with
62+
// SCTK CSD handling, since it changes cursor icons when you hover
63+
// cursor over the window borders.
64+
cursor_manager.reload_cursor_style();
65+
5966
sink.send_window_event(
6067
WindowEvent::CursorEntered {
6168
device_id: crate::event::DeviceId(
@@ -75,8 +82,6 @@ pub fn implement_pointer<T: 'static>(
7582
wid,
7683
);
7784
}
78-
79-
cursor_manager.reload_cursor_style();
8085
}
8186
PtrEvent::Leave { surface, .. } => {
8287
mouse_focus = None;

0 commit comments

Comments
 (0)