[Spice-devel] [PATCH xf86-qxl 24/27] Avoid calling qxl_update_monitors_config() with invalid config

Marc-André Lureau marcandre.lureau at gmail.com
Mon Jul 16 08:38:48 PDT 2012


During startup, the monitors are not yet enabled/set. and we
can avoid sending invalid/transient config.
---
 src/qxl_driver.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index ba2c5b0..9039e50 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -1904,7 +1904,11 @@ qxl_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
 
     scrn->virtualX = width;
     scrn->virtualY = height;
-    qxl_update_monitors_config(qxl);
+
+    // when starting, no monitor is enabled, and count == 0
+    // we want to avoid server/client freaking out with temporary config
+    if (check_crtc(qxl) != 0)
+        qxl_update_monitors_config(qxl);
 
     return TRUE;
 }
-- 
1.7.10.4



More information about the Spice-devel mailing list