From 2b0cb065be2cbf69685bf0b390924bad31f27538 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sun, 11 Oct 2026 09:09:31 +0300 Subject: [PATCH] Cancel pointing grabs when the screen is locked --- src/niri.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/niri.rs b/src/niri.rs index cd929736..ca28611d 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -6546,6 +6546,12 @@ impl Niri { .set_cursor_image(CursorImageStatus::default_named()); self.cancel_mru(); + // I don't like this being asynchronous, but it would be a bit involved to move + // this whole function to State. This should do for now. + self.event_loop.insert_idle(|state| { + state.cancel_pointing_grabs(); + }); + if self.output_state.is_empty() { // There are no outputs, lock the session right away. let lock = confirmation.ext_session_lock().clone();