From 9b073b2350d00dfdb32a4983a102c4bde843c92c Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Thu, 10 Aug 2023 09:58:26 +0400 Subject: Redraw on demand rather than continuously --- src/input.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/input.rs') diff --git a/src/input.rs b/src/input.rs index 011378db..a8f85b3a 100644 --- a/src/input.rs +++ b/src/input.rs @@ -89,6 +89,9 @@ impl Niri { utime: event.time(), }, ); + + // Redraw to update the cursor position. + self.queue_redraw(); } InputEvent::PointerMotionAbsolute { event, .. } => { let output = self.space.outputs().next().unwrap(); @@ -112,6 +115,9 @@ impl Niri { time: event.time_msec(), }, ); + + // Redraw to update the cursor position. + self.queue_redraw(); } InputEvent::PointerButton { event, .. } => { let pointer = self.seat.get_pointer().unwrap(); -- cgit