ui/gtk: fix bad widget realize on non-GFX VC
The GTK VirtualConsole is a union, it may be .gfx or .vte depending on the type. Fixes: 565f85a9c2 ("ui/gtk: force realization of drawing area") Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20260623-b4-ui-v4-1-4656aec3398d@redhat.com>
Marc-André Lureau committed
Jun 23, 2026 at 11:44 UTC
27f6d5ba9c97f57d1c7ce67bc01ffe8df0e11c34
1 file changed
+3
-1
ui/gtk.c
+3
-1
@@ -2585,7 +2585,9 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts)
2585
if (!con) {
2586
break;
2587
}
2588
- gtk_widget_realize(s->vc[idx].gfx.drawing_area);
2588
+ if (s->vc[idx].type == GD_VC_GFX) {
2589
+ gtk_widget_realize(s->vc[idx].gfx.drawing_area);
2590
+ }
2591
}
2592
2593
if (opts->u.gtk.has_show_menubar &&