[Spice-devel] [PATCH 2/3] client/x11: fix mode setting in MultyMonScreen::restore
Christophe Fergeau
cfergeau at redhat.com
Wed Oct 5 06:17:05 PDT 2011
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.
---
client/x11/platform.cpp | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp
index f7f72cd..57410a4 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();
--
1.7.6.4
More information about the Spice-devel
mailing list