[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.1.3 44/55] ui/gtk: force realization of drawing area
From: |
Michael Tokarev |
Subject: |
[Stable-8.1.3 44/55] ui/gtk: force realization of drawing area |
Date: |
Thu, 9 Nov 2023 16:42:48 +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 8ba41c8f13..cddbc46791 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2364,6 +2364,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");
@@ -2426,6 +2427,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-8.1.3 32/55] hw/xen: select kernel mode for per-vCPU event channel upcall vector, (continued)
- [Stable-8.1.3 32/55] hw/xen: select kernel mode for per-vCPU event channel upcall vector, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 36/55] hw/xen: use correct default protocol for xen-block on x86, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 38/55] block/nvme: nvme_process_completion() fix bound for cid, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 39/55] target/arm: Fix A64 LDRA immediate decode, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 37/55] virtio-gpu: block migration of VMs with blob=true, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 41/55] block/file-posix: fix update_zones_wp() caller, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 42/55] file-posix: fix over-writing of returning zone_append offset, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 40/55] qcow2: keep reference on zeroize with discard-no-unref enabled, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 45/55] ui/gtk-egl: apply scale factor when calculating window's dimension, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 43/55] ati-vga: Implement fallback for pixman routines, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 44/55] ui/gtk: force realization of drawing area,
Michael Tokarev <=
- [Stable-8.1.3 46/55] ui/gtk-egl: Check EGLSurface before doing scanout, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 47/55] target/mips: Fix MSA BZ/BNZ opcodes displacement, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 49/55] hw/ide: reset: cancel async DMA operation before resetting state, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 48/55] target/mips: Fix TX79 LQ/SQ opcodes, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 50/55] tests/qtest: ahci-test: add test exposing reset issue with pending callback, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 51/55] target/s390x: Fix CLC corrupting cc_src, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 52/55] tests/tcg/s390x: Test CLC with inaccessible second operand, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 54/55] tests/tcg/s390x: Test LAALG with negative cc_src, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 53/55] target/s390x: Fix LAALG not updating cc_src, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 55/55] hw/ide/ahci: trigger either error IRQ or regular IRQ, not both, Michael Tokarev, 2023/11/09