[gtk/gtk-3-24: 1/2] Quartz: Fix keyboard layout notification




commit 78a0cdde832c405bdf9f211b62da2a4fcdea96a7
Author: Luca Bacci <luca bacci982 gmail com>
Date:   Wed Nov 24 16:20:02 2021 +0100

    Quartz: Fix keyboard layout notification
    
    Register for notifications before initializing keymaps

 gdk/quartz/gdkkeys-quartz.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gdk/quartz/gdkkeys-quartz.c b/gdk/quartz/gdkkeys-quartz.c
index 9df493999c..701588d0cd 100644
--- a/gdk/quartz/gdkkeys-quartz.c
+++ b/gdk/quartz/gdkkeys-quartz.c
@@ -812,13 +812,13 @@ input_sources_changed_notification (CFNotificationCenterRef  center,
 static void
 gdk_quartz_keymap_init (GdkQuartzKeymap *keymap)
 {
-  update_keymap ();
   CFNotificationCenterAddObserver (CFNotificationCenterGetDistributedCenter (),
                                    keymap,
                                    input_sources_changed_notification,
                                    CFSTR ("AppleSelectedInputSourcesChangedNotification"),
                                    NULL,
                                    CFNotificationSuspensionBehaviorDeliverImmediately);
+  update_keymap ();
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]