xserver: Branch 'xorg-server-1.7-apple'

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Sun Sep 27 19:03:17 PDT 2009


 hw/xquartz/X11Application.m |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit ceaa5c779ceed3de5ea53727649613be3133b24e
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Sun Sep 27 18:25:57 2009 -0700

    XQuartz: Force a keymap resync on the first keypress to workaround XKB mucking with our keymap.
    
    We need to find a better way to work with XKB on this.

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 9fb1926..3cf7a77 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -1180,6 +1180,17 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe
             break;
             
         case NSKeyDown: case NSKeyUp:
+            {
+                /* XKB clobbers our keymap at startup, so we need to force it on the first keypress.
+                 * TODO: Make this less of a kludge.
+                 */
+                static int force_resync_keymap = YES;
+                if(force_resync_keymap) {
+                    DarwinSendDDXEvent(kXquartzReloadKeymap, 0);
+                    force_resync_keymap = NO;
+                }
+            }
+
             if(darwinSyncKeymap) {
 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
                 TISInputSourceRef key_layout = TISCopyCurrentKeyboardLayoutInputSource();


More information about the xorg-commit mailing list