fix: win, multi-display settings changed (#8531)

1. Windows, multi-display, as the controlled side.
2. Connect
3. Turn on privacy mode, with mode 2.
4. Turn off privacy mode.

Then the display settings are continues changed when connect &
disconnect.

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2024-06-29 20:16:22 +08:00 committed by GitHub
parent f9b0a88213
commit 967e63266f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -154,6 +154,8 @@ impl PrivacyModeImpl {
Self::restore_displays(&self.virtual_displays); Self::restore_displays(&self.virtual_displays);
allow_err!(Self::commit_change_display(0)); allow_err!(Self::commit_change_display(0));
self.restore_plug_out_monitor(); self.restore_plug_out_monitor();
self.displays.clear();
self.virtual_displays.clear();
} }
fn restore_plug_out_monitor(&mut self) { fn restore_plug_out_monitor(&mut self) {