Implement on-demand layer-shell keyboard focus

This commit is contained in:
Ivan Molodetskikh
2024-07-06 18:20:19 +04:00
parent 921ed63204
commit e394a7ff20
4 changed files with 87 additions and 20 deletions
+2
View File
@@ -372,6 +372,7 @@ impl ForeignToplevelHandler for State {
if let Some((mapped, _)) = self.niri.layout.find_window_and_output(&wl_surface) {
let window = mapped.window.clone();
self.niri.layout.activate_window(&window);
self.niri.layer_shell_on_demand_focus = None;
self.niri.queue_redraw_all();
}
}
@@ -540,6 +541,7 @@ impl XdgActivationHandler for State {
if let Some((mapped, _)) = self.niri.layout.find_window_and_output(&surface) {
let window = mapped.window.clone();
self.niri.layout.activate_window(&window);
self.niri.layer_shell_on_demand_focus = None;
self.niri.queue_redraw_all();
}
}