[Spice-devel] [PATCH] qxl_kms: read virtual monitor size from xorg.conf

Alon Levy alevy at redhat.com
Mon Jun 9 04:40:57 PDT 2014


Signed-off-by: Alon Levy <alevy at redhat.com>
---
 src/qxl_kms.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/qxl_kms.c b/src/qxl_kms.c
index c31c62d..d952495 100644
--- a/src/qxl_kms.c
+++ b/src/qxl_kms.c
@@ -164,8 +164,8 @@ Bool qxl_pre_init_kms(ScrnInfoPtr pScrn, int flags)
     if (drmmode_pre_init(pScrn, &qxl->drmmode, pScrn->bitsPerPixel / 8) == FALSE)
       goto out;
 
-    qxl->virtual_x = 1024;
-    qxl->virtual_y = 768;
+    qxl->virtual_x = -1;
+    qxl->virtual_y = -1;
     
     pScrn->display->virtualX = qxl->virtual_x;
     pScrn->display->virtualY = qxl->virtual_y;
@@ -335,6 +335,9 @@ Bool qxl_screen_init_kms(SCREEN_INIT_ARGS_DECL)
     if (!xf86CrtcScreenInit (pScreen))
 	return FALSE;
 
+    qxl->virtual_x = pScrn->currentMode->HDisplay;
+    qxl->virtual_y = pScrn->currentMode->VDisplay;
+
     if (!qxl_resize_primary_to_virtual (qxl))
 	return FALSE;
 
-- 
1.9.3



More information about the Spice-devel mailing list