XRRSetCrtcConfig waits for an XReply, so add a missing XLockDisplay,
this fixes a hang (due to a race so not always) when switching between
windowed and fullscreen mode.
---
client/x11/platform.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp
index 0642922..645c929 100644
--- a/client/x11/platform.cpp
+++ b/client/x11/platform.cpp
@@ -2150,8 +2150,10 @@ void XMonitor::disable()
if (!res.valid()) {
THROW("get screen resources failed");
}
+ XLockDisplay(display);
XRRSetCrtcConfig(display, res.get(), _crtc, CurrentTime,
0, 0, None, RR_Rotate_0, NULL, 0);
+ XUnlockDisplay(display);
XMonitorsList::iterator iter = _clones.begin();
for (; iter != _clones.end(); iter++) {
@@ -2174,10 +2176,12 @@ void XMonitor::enable()
if (!res.valid()) {
THROW("get screen resources failed");
}
+ XLockDisplay(display);
XRRSetCrtcConfig(display, res.get(), _crtc, CurrentTime,
_position.x, _position.y,
_mode, _rotation,
_outputs, _noutput);
+ XUnlockDisplay(display);
XMonitorsList::iterator iter = _clones.begin();
for (; iter != _clones.end(); iter++) {
--
1.7.3.1
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel