From ad08c1444a35f128c333b0d97c200ee1cdb136a4 Mon Sep 17 00:00:00 2001 From: "g.willems" Date: Tue, 14 Nov 2023 20:26:05 +0100 Subject: [PATCH] win32: precalculate keymap at display opening The default keymap and keymap layouts are calculated on request. If done once a surface is setup and listening at win32 events, we may then enter in a recursive loop. To avoid this, precalculate the keymap as soon as displays are open. Fixes #6203 Closes #6203 --- gdk/win32/gdkdisplay-win32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index d0f6a5bf49..55bfb4d581 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -548,6 +548,9 @@ _gdk_win32_display_open (const char *display_name) g_signal_emit_by_name (_gdk_display, "opened"); + /* Precalculate keymap, see #6203 */ + (void) _gdk_win32_display_get_keymap (_gdk_display); + GDK_NOTE (MISC, g_print ("... _gdk_display now set up\n")); return _gdk_display;