spice: don't enter opengl mode in case another UI provides opengl support
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 6 Jun 2017 11:06:18 +0000 (13:06 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 14 Jun 2017 07:52:35 +0000 (09:52 +0200)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170606110618.10393-1-kraxel@redhat.com

include/ui/spice-display.h
ui/spice-core.c
ui/spice-display.c

index 184d4c373a2f522c8682c0a8d1dc5109b6cb139a..4ba9444dba357a74e921f00b52ab106f5dcb6674 100644 (file)
@@ -140,6 +140,8 @@ struct SimpleSpiceCursor {
     QXLCursor cursor;
 };
 
+extern bool spice_opengl;
+
 int qemu_spice_rect_is_empty(const QXLRect* r);
 void qemu_spice_rect_union(QXLRect *dest, const QXLRect *r);
 
index a087ad5da92f2921b6da4bb0a2da8858104c1754..182f550f1f845a2e37394f07541ac9129704453b 100644 (file)
@@ -847,6 +847,7 @@ void qemu_spice_init(void)
             exit(1);
         }
         display_opengl = 1;
+        spice_opengl = 1;
     }
 #endif
 }
index b353445f5817c7f42ce3a3bad0f837d4ef98b375..042292cc90061cc398154aef498115ef80d9ffa8 100644 (file)
@@ -27,6 +27,7 @@
 #include "ui/spice-display.h"
 
 static int debug = 0;
+bool spice_opengl;
 
 static void GCC_FMT_ATTR(2, 3) dprint(int level, const char *fmt, ...)
 {
@@ -1013,7 +1014,7 @@ static void qemu_spice_display_init_one(QemuConsole *con)
 
     ssd->dcl.ops = &display_listener_ops;
 #ifdef HAVE_SPICE_GL
-    if (display_opengl) {
+    if (spice_opengl) {
         ssd->dcl.ops = &display_listener_gl_ops;
         ssd->gl_unblock_bh = qemu_bh_new(qemu_spice_gl_unblock_bh, ssd);
         ssd->gl_unblock_timer = timer_new_ms(QEMU_CLOCK_REALTIME,