xserver: Branch 'master'

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Sat Dec 1 17:29:59 PST 2007


 hw/darwin/darwinKeyboard.c        |    9 +++++++--
 hw/darwin/quartz/Makefile.am      |    1 -
 hw/darwin/quartz/quartzKeyboard.c |   22 ++--------------------
 3 files changed, 9 insertions(+), 23 deletions(-)

New commits:
commit 9ad4560b3cbd42e647d6227746d4d037616d57cf
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Sat Dec 1 16:23:23 2007 -0800

    Darwin: Alt is Mode_switch Switching to Mode_switch to maintain compatibility with Tiger X11.
    (cherry picked from commit 8a76c99c0ebbaf7375f3a9c75c4f7921a79024da)

diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c
index 7f7b7c7..851a10f 100644
--- a/hw/darwin/darwinKeyboard.c
+++ b/hw/darwin/darwinKeyboard.c
@@ -518,8 +518,8 @@ Bool DarwinParseNXKeyMapping(
                                 (left ? XK_Control_L : XK_Control_R);
                         break;
                     case NX_MODIFIERKEY_ALTERNATE:
-                        info->keyMap[keyCode * GLYPHS_PER_KEY] =
-                                (left ? XK_Alt_L : XK_Alt_R);
+                        info->keyMap[keyCode * GLYPHS_PER_KEY] = XK_Mode_switch;
+                                // (left ? XK_Alt_L : XK_Alt_R);
                         break;
                     case NX_MODIFIERKEY_COMMAND:
                         info->keyMap[keyCode * GLYPHS_PER_KEY] =
@@ -709,6 +709,11 @@ DarwinBuildModifierMaps(darwinKeyboardInfo *info) {
                 break;
 
             case XK_Mode_switch:
+                // Yes, this is ugly.  This needs to be cleaned up when we integrate quartzKeyboard with this code and refactor.
+#ifdef NX_MODIFIERKEY_RALTERNATE
+                info->modifierKeycodes[NX_MODIFIERKEY_RALTERNATE][0] = i;
+#endif
+                info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i;
                 info->modMap[MIN_KEYCODE + i] = Mod1Mask;
                 break;
 
diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am
index fe66429..f5199df 100644
--- a/hw/darwin/quartz/Makefile.am
+++ b/hw/darwin/quartz/Makefile.am
@@ -3,7 +3,6 @@ noinst_LIBRARIES = libXQuartz.a
 AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
 AM_OBJCFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = \
-	-DHAS_KL_API \
 	-I$(srcdir) -I$(srcdir)/.. \
 	-I$(top_srcdir)/miext/rootless
 
diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c
index b87249f..ee485b8 100644
--- a/hw/darwin/quartz/quartzKeyboard.c
+++ b/hw/darwin/quartz/quartzKeyboard.c
@@ -44,8 +44,6 @@
 #include "X11/keysym.h"
 #include "keysym2ucs.h"
 
-#ifdef HAS_KL_API
-
 #define HACK_MISSING 1
 #define HACK_KEYPAD 1
 
@@ -68,11 +66,11 @@ const static struct {
     {55,  XK_Meta_L},
     {56,  XK_Shift_L},
     {57,  XK_Caps_Lock},
-    {58,  XK_Alt_L},
+    {58,  XK_Mode_switch},
     {59,  XK_Control_L},
 
     {60,  XK_Shift_R},
-    {61,  XK_Alt_R},
+    {61,  XK_Mode_switch},
     {62,  XK_Control_R},
     {63,  XK_Meta_R},
 
@@ -332,19 +330,3 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
     
     return TRUE;
 }
-
-#else /* !HAS_KL_API */
-
-unsigned int
-DarwinModeSystemKeymapSeed (void)
-{
-    return 0;
-}
-
-Bool
-DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
-{
-    return FALSE;
-}
-
-#endif /* HAS_KL_API */


More information about the xorg-commit mailing list