seat: Workaround old active outputs on hotplug
This commit is contained in:
parent
9c41c80345
commit
b2686424ea
9 changed files with 69 additions and 14 deletions
|
|
@ -448,7 +448,15 @@ impl Shell {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn remove_output(&mut self, output: &Output) {
|
||||
pub fn remove_output(&mut self, output: &Output, seats: impl Iterator<Item = Seat<State>>) {
|
||||
if let Some(first_output) = self.outputs.get(0) {
|
||||
for seat in seats {
|
||||
if &seat.active_output() == output {
|
||||
seat.set_active_output(first_output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !self.outputs.contains(output) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue