From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyvmz-0005Y0-Md for qemu-devel@nongnu.org; Mon, 02 Oct 2017 04:09:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyvmu-0005jp-MV for qemu-devel@nongnu.org; Mon, 02 Oct 2017 04:09:21 -0400 From: Anthoine Bourgeois Date: Mon, 2 Oct 2017 10:09:06 +0200 Message-Id: <20171002080906.4682-1-anthoine.bourgeois@gmail.com> Subject: [Qemu-devel] [PATCH] gtk: fix wrong id between texture and framebuffer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Anthoine Bourgeois , Anthoine Bourgeois List-ID: From: Anthoine Bourgeois 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 --- ui/gtk-gl-area.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c index 18b298f..026b7d7 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; } -- 2.9.3