[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.7 53/62] ui/gtk: force realization of drawing area
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.7 53/62] ui/gtk: force realization of drawing area |
Date: |
Thu, 9 Nov 2023 16:59:21 +0300 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Fixes the GL context creation from a widget that isn't yet realized (in
a hidden tab for example).
Resolves:
https://gitlab.com/qemu-project/qemu/-/issues/1727
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Antonio Caggiano <quic_acaggian@quicinc.com>
Message-Id: <20231017111642.1155545-1-marcandre.lureau@redhat.com>
(cherry picked from commit 565f85a9c293818a91a3d3414311303de7e00cec)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/ui/gtk.c b/ui/gtk.c
index e681e8c319..283c41a1a1 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2317,6 +2317,7 @@ static void gtk_display_init(DisplayState *ds,
DisplayOptions *opts)
GdkDisplay *window_display;
GtkIconTheme *theme;
char *dir;
+ int idx;
if (!gtkinit) {
fprintf(stderr, "gtk initialization failed\n");
@@ -2379,6 +2380,15 @@ static void gtk_display_init(DisplayState *ds,
DisplayOptions *opts)
gtk_container_add(GTK_CONTAINER(s->window), s->vbox);
gtk_widget_show_all(s->window);
+
+ for (idx = 0;; idx++) {
+ QemuConsole *con = qemu_console_lookup_by_index(idx);
+ if (!con) {
+ break;
+ }
+ gtk_widget_realize(s->vc[idx].gfx.drawing_area);
+ }
+
if (opts->u.gtk.has_show_menubar &&
!opts->u.gtk.show_menubar) {
gtk_widget_hide(s->menu_bar);
--
2.39.2
- [Stable-7.2.7 35/62] migration: Fix analyze-migration read operation signedness, (continued)
- [Stable-7.2.7 35/62] migration: Fix analyze-migration read operation signedness, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 41/62] tests/migration: Add -fno-stack-protector, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 40/62] misc/led: LED state is set opposite of what is expected, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 39/62] hw/sd/sdhci: Block Size Register bits [14:12] is lost, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 47/62] target/arm: Don't access TCG code when debugging with KVM, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 46/62] Revert "linux-user: fix compat with glibc >= 2.36 sys/mount.h", Michael Tokarev, 2023/11/09
- [Stable-7.2.7 52/62] ati-vga: Implement fallback for pixman routines, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 49/62] target/arm: Fix handling of SW and NSW bits for stage 2 walks, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 48/62] target/arm: Don't allow stage 2 page table walks to downgrade to NS, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 50/62] target/arm: Correctly propagate stage 1 BTI guarded bit in a two-stage walk, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 53/62] ui/gtk: force realization of drawing area,
Michael Tokarev <=
- [Stable-7.2.7 55/62] ui/gtk-egl: Check EGLSurface before doing scanout, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 51/62] block/nvme: nvme_process_completion() fix bound for cid, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 56/62] target/mips: Fix MSA BZ/BNZ opcodes displacement, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 54/62] ui/gtk-egl: apply scale factor when calculating window's dimension, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 57/62] target/mips: Fix TX79 LQ/SQ opcodes, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 58/62] hw/ide: reset: cancel async DMA operation before resetting state, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 59/62] tests/qtest: ahci-test: add test exposing reset issue with pending callback, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 61/62] tests/tcg/s390x: Test LAALG with negative cc_src, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 60/62] target/s390x: Fix LAALG not updating cc_src, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 62/62] hw/ide/ahci: trigger either error IRQ or regular IRQ, not both, Michael Tokarev, 2023/11/09