[Spice-devel] [linux/vd-agent] vdagent: Do not send empty screen resolution messages

Victor Toso victortoso at redhat.com
Thu Nov 15 16:07:29 UTC 2018


From: Victor Toso <me at victortoso.com>

Easier to trigger on Wayland guest by running

> xrandr --output XWAYLAND0 --rotate left

In current master, this causes the spice-vdagentd to disconnect from
the client. In 0.18 branch (latest release), mouse becomes unusable as
mentioned in the referred bug below.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1641723

Signed-off-by: Victor Toso <victortoso at redhat.com>
---
 src/vdagent/x11-randr.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/vdagent/x11-randr.c b/src/vdagent/x11-randr.c
index c5fba51..81a2cd6 100644
--- a/src/vdagent/x11-randr.c
+++ b/src/vdagent/x11-randr.c
@@ -959,6 +959,12 @@ no_info:
         }
     }
 
+    if (screen_count == 0) {
+        syslog(LOG_DEBUG, "Screen count is zero, are we on wayland?");
+        g_free(res);
+        return;
+    }
+
     if (x11->debug) {
         syslog(LOG_DEBUG, "Sending guest screen resolutions to vdagentd:");
         for (i = 0; i < screen_count; i++) {
-- 
2.19.1



More information about the Spice-devel mailing list