Add comment to updating kb focus in confirm MRU

This commit is contained in:
Ivan Molodetskikh
2026-06-05 08:26:40 +03:00
parent f3696081d1
commit f717ae030f
+5
View File
@@ -993,7 +993,12 @@ impl State {
pub fn confirm_mru(&mut self) {
if let Some(window) = self.niri.close_mru(MruCloseRequest::Confirm) {
// focus_window() will warp the cursor to the window only when the keyboard focus is on
// the layout. However, right now the keyboard focus is still on the MRU (that we had
// just closed) since it's only updated at the end of the event loop cycle. Force-update
// the keyboard focus here to make cursor warping work.
self.update_keyboard_focus();
self.focus_window(&window);
}
}