From: Anthoine Bourgeois Date: Mon, 2 Oct 2017 12:40:52 +0000 (+0200) Subject: gtk: fix wrong id between texture and framebuffer X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2ff408de9c080f2fb5a94ebf6a209c6180c64933;p=qemu.git gtk: fix wrong id between texture and framebuffer The gd_gl_area_scanout_texture must destroy framebuffer if there is no texture id instead of no framebuffer id. The effect was a black screen with "-vga virtio -display gtk,gl=on" options. The bug was introduce by a4f113fd "gtk: use framebuffer helper functions." Signed-off-by: Anthoine Bourgeois Message-id: 20171002124052.13829-1-anthoine.bourgeois@gmail.com Signed-off-by: Gerd Hoffmann --- diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c index 01ebf2c7de..7080f4e14f 100644 --- a/ui/gtk-gl-area.c +++ b/ui/gtk-gl-area.c @@ -178,8 +178,7 @@ void gd_gl_area_scanout_texture(DisplayChangeListener *dcl, gtk_gl_area_make_current(GTK_GL_AREA(vc->gfx.drawing_area)); - if (vc->gfx.guest_fb.framebuffer == 0 || - vc->gfx.w == 0 || vc->gfx.h == 0) { + if (backing_id == 0 || vc->gfx.w == 0 || vc->gfx.h == 0) { gtk_gl_area_set_scanout_mode(vc, false); return; }