Cancel pointing grabs when the screen is locked
Browse files at this commit2b0cb065be2cbf69685bf0b390924bad31f27538Parent: 4ad20371 changed file +6 -0
- src/niri.rs +6 -0
src/niri.rsmodified+6 -0
| @@ -6546,6 +6546,12 @@ impl Niri { | |||
| 6546 | .set_cursor_image(CursorImageStatus::default_named()); | 6546 | .set_cursor_image(CursorImageStatus::default_named()); |
| 6547 | self.cancel_mru(); | 6547 | self.cancel_mru(); |
| 6548 | 6548 | ||
| 6549 | + // I don't like this being asynchronous, but it would be a bit involved to move | ||
| 6550 | + // this whole function to State. This should do for now. | ||
| 6551 | + self.event_loop.insert_idle(|state| { | ||
| 6552 | + state.cancel_pointing_grabs(); | ||
| 6553 | + }); | ||
| 6554 | + | ||
| 6549 | if self.output_state.is_empty() { | 6555 | if self.output_state.is_empty() { |
| 6550 | // There are no outputs, lock the session right away. | 6556 | // There are no outputs, lock the session right away. |
| 6551 | let lock = confirmation.ext_session_lock().clone(); | 6557 | let lock = confirmation.ext_session_lock().clone(); |