[Spice-devel] Fwd: [spice-gtk PATCH] Single headed monitor updates should start at 0, 0
Sandy Stutsman
sstutsma at redhat.com
Fri Mar 20 16:07:41 PDT 2015
----- Forwarded Message -----
From: sstutsma at redhat.com
To: spice-devel at lists.freedesktop.org
Cc: "Sandy Stutsman" <sstutsma at redhat.com>
Sent: Wednesday, March 11, 2015 1:35:35 PM
Subject: [spice-gtk PATCH] Single headed monitor updates should start at 0,0
From: Sandy Stutsman <sstutsma at redhat.com>
For Windows VMs, each monitor is driven by its own instance of the qxl
driver, so monitors have only one head. With the addition of the
monitors_config message in the Windows Driver, it is now possible to
have a single headed monitor with a non zero position. Even so, the
update_area call should be for the whole monitor extent.
---
gtk/spice-widget.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index f5e8aab..8f3fd1a 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -297,7 +297,13 @@ static void update_monitor_area(SpiceDisplay *display)
spice_main_update_display(d->main, get_display_id(display),
c->x, c->y, c->width, c->height, FALSE);
- update_area(display, c->x, c->y, c->width, c->height);
+
+ //If only one head on this monitor x,y should always be treated as zero
+ if (monitors->len == 1)
+ update_area(display, 0, 0, c->width, c->height);
+ else
+ update_area(display, c->x, c->y, c->width, c->height);
+
g_clear_pointer(&monitors, g_array_unref);
return;
--
2.1.0
More information about the Spice-devel
mailing list