mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
gd_draw_event shouldn't try to repaint if surface does not exist for the VC. Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> Message-Id: <20211104065153.28897-4-dongwon.kim@intel.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
4872a023a5
commit
7cf87257f7
1 changed files with 3 additions and 0 deletions
3
ui/gtk.c
3
ui/gtk.c
|
@ -778,6 +778,9 @@ static gboolean gd_draw_event(GtkWidget *widget, cairo_t *cr, void *opaque)
|
|||
if (!vc->gfx.ds) {
|
||||
return FALSE;
|
||||
}
|
||||
if (!vc->gfx.surface) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
vc->gfx.dcl.update_interval =
|
||||
gd_monitor_update_interval(vc->window ? vc->window : s->window);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue