From 421ddb7422d676c5bd15f1434203aa6f3b8dc170 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 17 Oct 2010 11:38:08 +0200 Subject: client: change monitor mode setting <-> fullscreen window mode setting order 1) Make the order when starting up in fullscreen mode the same as when switching from window -> fullscreen: First set the mode, then make the window fullscreen 2) Change the order when leaving fullscreen mode, first restore the original monitor mode, then make the window non fullscreen. Changing the monitor mode in X11 causes the window manager to re-arrange windows, and if this happens while compiz is busy mapping the window it gets confused and maps the window with a maxmimized size. --- client/application.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/application.cpp b/client/application.cpp index 3aaa3e3a..15916f74 100644 --- a/client/application.cpp +++ b/client/application.cpp @@ -673,9 +673,9 @@ RedScreen* Application::get_screen(int id) mon = get_monitor(id); capture = release_capture(); screen->set_monitor(mon); + prepare_monitors(); position_screens(); screen->show_full_screen(); - prepare_monitors(); if (capture) { _main_screen->activate(); @@ -1529,6 +1529,7 @@ void Application::exit_full_screen() LOG_INFO(""); _changing_screens = true; release_capture(); + restore_monitors(); for (int i = 0; i < (int)_screens.size(); i++) { if (_screens[i]) { Monitor* mon; @@ -1539,7 +1540,6 @@ void Application::exit_full_screen() } } } - restore_monitors(); _full_screen = false; restore_screens_size(); show(); -- cgit