From e3e04b0a2a712ed40e8be47a3be3992a97ecfc28 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 4 Oct 2011 13:52:22 +0200 Subject: 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. --- client/x11/platform.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'client') 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(); -- cgit