diff options
Diffstat (limited to 'ui/gtk.c')
-rw-r--r-- | ui/gtk.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -657,6 +657,8 @@ static const DisplayChangeListenerOps dcl_gl_area_ops = { .dpy_has_dmabuf = gd_has_dmabuf, }; +#ifdef CONFIG_X11 + static const DisplayChangeListenerOps dcl_egl_ops = { .dpy_name = "gtk-egl", .dpy_gfx_update = gd_egl_update, @@ -679,6 +681,8 @@ static const DisplayChangeListenerOps dcl_egl_ops = { .dpy_has_dmabuf = gd_has_dmabuf, }; +#endif + #endif /* CONFIG_OPENGL */ /** QEMU Events **/ @@ -797,8 +801,12 @@ static gboolean gd_draw_event(GtkWidget *widget, cairo_t *cr, void *opaque) /* invoke render callback please */ return FALSE; } else { +#ifdef CONFIG_X11 gd_egl_draw(vc); return TRUE; +#else + abort(); +#endif } } #endif @@ -2031,6 +2039,7 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc, G_CALLBACK(gl_area_realize), vc); vc->gfx.dcl.ops = &dcl_gl_area_ops; } else { +#ifdef CONFIG_X11 vc->gfx.drawing_area = gtk_drawing_area_new(); /* * gtk_widget_set_double_buffered() was deprecated in 3.14. @@ -2044,6 +2053,9 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc, #pragma GCC diagnostic pop vc->gfx.dcl.ops = &dcl_egl_ops; vc->gfx.has_dmabuf = qemu_egl_has_dmabuf(); +#else + abort(); +#endif } } else #endif @@ -2354,8 +2366,10 @@ static void early_gtk_display_init(DisplayOptions *opts) } else #endif { +#ifdef CONFIG_X11 DisplayGLMode mode = opts->has_gl ? opts->gl : DISPLAYGL_MODE_ON; gtk_egl_init(mode); +#endif } #endif } |