From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e45GE-00067e-9W for qemu-devel@nongnu.org; Mon, 16 Oct 2017 09:16:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e45GD-0004sm-7G for qemu-devel@nongnu.org; Mon, 16 Oct 2017 09:16:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45558) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e45GD-0004s9-1K for qemu-devel@nongnu.org; Mon, 16 Oct 2017 09:16:49 -0400 From: Gerd Hoffmann Date: Mon, 16 Oct 2017 15:16:44 +0200 Message-Id: <20171016131644.9565-12-kraxel@redhat.com> In-Reply-To: <20171016131644.9565-1-kraxel@redhat.com> References: <20171016131644.9565-1-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 11/11] gtk: fix wrong id between texture and framebuffer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthoine Bourgeois , Gerd Hoffmann 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 Message-id: 20171002124052.13829-1-anthoine.bourgeois@gmail.com Signed-off-by: Gerd Hoffmann --- 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 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; } -- 2.9.3