summaryrefslogtreecommitdiffstats
path: root/client/x11
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-10-04 15:05:43 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2011-10-05 15:09:48 +0200
commitbc9306852d145916a199176cf54967b590897ac0 (patch)
tree3c4b4e2575755c312e88b64230bc3b9f07b73cea /client/x11
parente3e04b0a2a712ed40e8be47a3be3992a97ecfc28 (diff)
downloadspice-bc9306852d145916a199176cf54967b590897ac0.tar.gz
spice-bc9306852d145916a199176cf54967b590897ac0.tar.xz
spice-bc9306852d145916a199176cf54967b590897ac0.zip
client/x11: reset screen positions in XMonitor::do_restore
XMonitor::do_restore (called for example when going out of fullscreen) restore the screen resolution to its previous state, but it doesn't take care of repositioning the screen to their previous position, which is one of the advantages of using randr 1.2. Since MultyMonScreen::restore handles all of this for us, just call it to restore the monitor position/resolutions to their previous settings. Before doing any changes, MultyMonScreen::restore checks if there's something to do, so calling it once per monitor won't be an issue, the resolution/position will only be set the first time. This has the side-effect of fixing bug #693431. This bug occurs when closing the client after the client went in and out of fullscreen. MultyMonScreen::~MultyMonScreen calls MultyMonScreen::restore, which decides to change the screen positions since they were lost when going to fullscreen because XMonitor::restore didn't restore the positions. After this change, the positions will be properly restored and MultyMonScreen::restore won't be needlessly called upon client shutdown.
Diffstat (limited to 'client/x11')
-rw-r--r--client/x11/platform.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp
index 57410a4e..aef68706 100644
--- a/client/x11/platform.cpp
+++ b/client/x11/platform.cpp
@@ -1080,6 +1080,7 @@ public:
void disable();
void enable();
+ void restore();
bool set_monitor_mode(XMonitor& monitor, const XRRModeInfo& mode_info);
@@ -1092,7 +1093,6 @@ private:
XMonitor* crtc_overlap_test(int x, int y, int width, int height);
void monitors_cleanup();
- void restore();
private:
int _min_width;
@@ -2232,7 +2232,7 @@ void XMonitor::do_restore()
if (!mode_changed()) {
return;
}
- do_set_mode(_saved_size.x, _saved_size.y);
+ _container.restore();
}
int XMonitor::get_depth()