seat: Workaround old active outputs on hotplug

This commit is contained in:
Victoria Brekenfeld 2022-11-22 10:07:17 +01:00
parent 9c41c80345
commit b2686424ea
9 changed files with 69 additions and 14 deletions

View file

@ -167,6 +167,10 @@ impl Common {
let seats = state.common.seats().cloned().collect::<Vec<_>>();
for seat in seats {
let output = seat.active_output();
if !state.common.shell.outputs.contains(&output) {
seat.set_active_output(&state.common.shell.outputs[0]);
continue;
}
let last_known_focus = ActiveFocus::get(&seat);
if let Some(target) = last_known_focus {