[Spice-commits] server/red-qxl.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Sep 19 13:56:08 UTC 2019
server/red-qxl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 4f2d90a7849fafebc74dec608f9b4ffa9400d1a6
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Thu Sep 19 11:17:08 2019 +0100
red-qxl: Make sure we have at least one monitor
It does not make sense to have a graphic card without a monitor.
In spice_qxl_set_max_monitors we prevent to set 0 monitors, do
the same in spice_qxl_set_device_info.
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1691721.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Tested-by: Dr. David Alan Gilbert <dgilbert at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/server/red-qxl.c b/server/red-qxl.c
index 03348270..dbfcd440 100644
--- a/server/red-qxl.c
+++ b/server/red-qxl.c
@@ -804,7 +804,7 @@ void spice_qxl_set_device_info(QXLInstance *instance,
}
instance->st->monitors_count = device_display_id_count;
- instance->st->max_monitors = device_display_id_count;
+ instance->st->max_monitors = MAX(1u, device_display_id_count);
reds_send_device_display_info(red_qxl_get_server(instance->st));
}
More information about the Spice-commits
mailing list