Warp mouse only if layout is focused
Browse files at this commit2984722f80d794af93c02fcadb157d0f8f1cc8a5Parent: 118773e1 changed file +4 -0
- src/niri.rs +4 -0
src/niri.rsmodified+4 -0
| @@ -475,6 +475,10 @@ impl State { | |||
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | pub fn move_cursor_to_focused_tile(&mut self, mode: CenterCoords) -> bool { | 477 | pub fn move_cursor_to_focused_tile(&mut self, mode: CenterCoords) -> bool { |
| 478 | + if !self.niri.keyboard_focus.is_layout() { | ||
| 479 | + return false; | ||
| 480 | + } | ||
| 481 | + | ||
| 478 | let Some(output) = self.niri.layout.active_output() else { | 482 | let Some(output) = self.niri.layout.active_output() else { |
| 479 | return false; | 483 | return false; |
| 480 | }; | 484 | }; |