mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
client/x11: fix mode setting in MultyMonScreen::restore
MultyMonScreen::restore changes the X11 Screen resolution, but it doesn't use MultyMonScreen::set_size. This means MultyMonScreen::_width and MultyMonScreen::_height don't get updated to reflect the new resolution settings, which could cause issues later on. Until now this was safe since the only caller of MultyMonScreen::restore was MultyMonScreen destructor.
This commit is contained in:
parent
ae3e63a9d8
commit
e3e04b0a2a
@ -1356,13 +1356,7 @@ void MultyMonScreen::restore()
|
||||
X_DEBUG_SYNC(get_display());
|
||||
XMonitor::inc_change_ref();
|
||||
disable();
|
||||
Window root_window = RootWindow(get_display(), get_screen());
|
||||
|
||||
XLockDisplay(get_display());
|
||||
XRRSetScreenSize(get_display(), root_window, _saved_width,
|
||||
_saved_height,
|
||||
_saved_width_mm, _saved_height_mm);
|
||||
XUnlockDisplay(get_display());
|
||||
set_size(_saved_width, _saved_height);
|
||||
XMonitorsList::iterator iter = _monitors.begin();
|
||||
for (; iter != _monitors.end(); iter++) {
|
||||
(*iter)->revert();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user