Commit 2ff408de authored by Anthoine Bourgeois's avatar Anthoine Bourgeois Committed by Gerd Hoffmann
Browse files

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: default avatarAnthoine Bourgeois <anthoine.bourgeois@blade-group.com>
Message-id: 20171002124052.13829-1-anthoine.bourgeois@gmail.com
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 82a4f1a9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
    }