summaryrefslogtreecommitdiffstats
path: root/client/x11/platform.cpp
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-10-04 13:52:22 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2011-10-05 15:09:47 +0200
commite3e04b0a2a712ed40e8be47a3be3992a97ecfc28 (patch)
tree52e319706e8e9d31fa7586927931ba52e131997e /client/x11/platform.cpp
parentae3e63a9d8efe6311270c53150c2a79b632aaa07 (diff)
downloadspice-e3e04b0a2a712ed40e8be47a3be3992a97ecfc28.tar.gz
spice-e3e04b0a2a712ed40e8be47a3be3992a97ecfc28.tar.xz
spice-e3e04b0a2a712ed40e8be47a3be3992a97ecfc28.zip
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.
Diffstat (limited to 'client/x11/platform.cpp')
-rw-r--r--client/x11/platform.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp
index f7f72cdc..57410a4e 100644
--- a/client/x11/platform.cpp
+++ b/client/x11/platform.cpp
@@ -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();