From 9f07715b469a481849ee35ffa33d6dab34356c7d Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Tue, 7 Oct 2025 22:20:00 +0200 Subject: Fix intermittent cursor ghosting when crossing between monitors Live report: the real cursor sometimes leaves a brief ghost behind right after moving between monitors. The bare-metal render loop already forces a full repaint (ages = [0, 0]) on a workspace switch or any window move/ resize/open/close/restack, both added earlier for the same underlying gap: the damage tracker's own element diffing doesn't always catch a vacated region on its own. Neither reset noticed the pointer leaving one monitor for another - no window moved, no workspace changed - so that head's own vacated cursor-sized region was left entirely to the tracker's diffing, intermittently. Adds UdevState::last_cursor_head, compared each frame the same way the other two resets are; only the head the pointer just left gets forced back to ages = [0, 0] (the newly-entered head draws a genuinely new element there and diffs correctly on its own). --- crates/wayland/src/udev/platform.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/wayland/src/udev/platform.rs') diff --git a/crates/wayland/src/udev/platform.rs b/crates/wayland/src/udev/platform.rs index b09bd4b..bf82b32 100644 --- a/crates/wayland/src/udev/platform.rs +++ b/crates/wayland/src/udev/platform.rs @@ -170,6 +170,7 @@ impl UdevPlatform { disabled_connectors: std::collections::HashSet::new(), last_rendered_workspace: None, last_rendered_layout: None, + last_cursor_head: None, gpu: gpu_context, }; -- cgit v1.2.3