[Xquartz-changes] xserver: Branch 'server-1.6-apple' - 4 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Wed Jan 13 14:43:01 PST 2010


Rebased ref, commits from common ancestor:
commit 18649d82ce54559bbdc0d07c47bf12cd7d419bc4
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Jan 13 11:20:29 2010 -0800

    XQuartz: Update copyright in bundle for 2010
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
    (cherry picked from commit 6bde306f7f6b9bbabeaa8bb910ea549be906cd8b)

diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp
index 3c7bdfb..4081e9e 100644
--- a/hw/xquartz/bundle/Info.plist.cpp
+++ b/hw/xquartz/bundle/Info.plist.cpp
@@ -35,9 +35,9 @@
                 <string>http://xquartz.macosforge.org/downloads/sparkle/release.xml</string>
 #endif
 	<key>NSHumanReadableCopyright</key>
-		<string>© 2003-2009 Apple Inc.
+		<string>© 2003-2010 Apple Inc.
 © 2003 XFree86 Project, Inc.
-© 2003-2009 X.org Foundation, Inc.
+© 2003-2010 X.org Foundation, Inc.
 </string>
 	<key>NSMainNibFile</key>
 		<string>main</string>
commit 096155ef279d9f9388a31624213ae96c6f41767c
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Jan 12 13:43:08 2010 -0800

    XQuartz: Setup the modifier map in the quartz thread
    
    This avoids possible doing it twice which could result in incorrect
    keycodes for alt due to our loss of information about its side.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
    (cherry picked from commit 7c22da2dc49ce50b8306ba50c8cca128031591c4)

diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 5dabdbe..6116bff 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -197,6 +197,17 @@ static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) {
     int i;
     KeySym *k;
 
+    /* This avoids processing the data a second time which will happen
+     * upon the first keypress (since we need to reload our keymap to
+     * clobber XKB).  Doing this a second time will result in an
+     * incorrect keycode for left alt because both are changed to 
+     * mode_switch here.  This is not a good "final" solution, but it
+     * works around the issue for now.
+     */
+    if(info->modMapInitialized)
+        return;
+    info->modMapInitialized = TRUE;
+
     memset(info->modMap, NoSymbol, sizeof(info->modMap));
     memset(info->modifierKeycodes, 0, sizeof(info->modifierKeycodes));
 
@@ -254,6 +265,7 @@ static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) {
                 break;
 
             case XK_Mode_switch:
+                ErrorF("DarwinBuildModifierMaps: XK_Mode_switch encountered, unable to determine side.\n");
                 info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i;
 #ifdef NX_MODIFIERKEY_RALTERNATE
                 info->modifierKeycodes[NX_MODIFIERKEY_RALTERNATE][0] = i;
@@ -398,7 +410,6 @@ void DarwinKeyboardReloadHandler(void) {
     
     pthread_mutex_lock(&keyInfo_mutex); {
         /* Initialize our keySyms */
-        DarwinBuildModifierMaps(&keyInfo);
         keySyms.map = keyInfo.keyMap;
         keySyms.mapWidth   = GLYPHS_PER_KEY;
         keySyms.minKeyCode = MIN_KEYCODE;
@@ -823,5 +834,8 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
         }
     }
 
+    info->modMapInitialized = FALSE;
+    DarwinBuildModifierMaps(info);
+
     return TRUE;
 }
diff --git a/hw/xquartz/quartzKeyboard.h b/hw/xquartz/quartzKeyboard.h
index 1aaec6e..47885b5 100644
--- a/hw/xquartz/quartzKeyboard.h
+++ b/hw/xquartz/quartzKeyboard.h
@@ -45,6 +45,7 @@ typedef struct darwinKeyboardInfo_struct {
     CARD8 modMap[MAP_LENGTH];
     KeySym keyMap[MAP_LENGTH * GLYPHS_PER_KEY];
     unsigned char modifierKeycodes[32][2];
+    Bool modMapInitialized;
 } darwinKeyboardInfo;
 
 /* These functions need to be implemented by Xquartz, XDarwin, etc. */
commit e6336fe66c24caaa1d5ef75292037984ca8df9a9
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Dec 9 18:27:31 2009 -0800

    XQuartz: pbproxy: Fix building of standalone xpbproxy executable
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
    (cherry picked from commit 97a6454ea57587db490873fee8ff0f899882972d)

diff --git a/hw/xquartz/pbproxy/Makefile.am b/hw/xquartz/pbproxy/Makefile.am
index e1c537f..02da6b2 100644
--- a/hw/xquartz/pbproxy/Makefile.am
+++ b/hw/xquartz/pbproxy/Makefile.am
@@ -15,6 +15,9 @@ if STANDALONE_XPBPROXY
 bin_PROGRAMS = xpbproxy
 xpbproxy_SOURCES = app-main.m
 xpbproxy_LDADD = libxpbproxy.la
+xpbproxy_LDFLAGS = -Wl,-framework,Cocoa
+
+AM_CPPFLAGS += -DSTANDALONE_XPBPROXY
 
 endif
 
commit 23da4042591bf4ad4536b57ba64d83d7158e002a
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Jan 13 14:39:54 2010 -0800

    XQuartz: Don't FatalError in x_hook_run if the list is empty
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
    (cherry picked from commit 6f6a99abc12ddee82898fdabfb50c17e90e094b9)

diff --git a/hw/xquartz/xpr/x-hook.c b/hw/xquartz/xpr/x-hook.c
index 03e7f85..5b850fe 100644
--- a/hw/xquartz/xpr/x-hook.c
+++ b/hw/xquartz/xpr/x-hook.c
@@ -79,6 +79,9 @@ X_PFX (hook_run) (x_list *lst, void *arg)
     void **data;
     int length, i;
 
+    if(!lst)
+        return;
+
     length = X_PFX (list_length) (lst);
     fun = xalloc (sizeof (x_hook_function *) * length);
     data = xalloc (sizeof (void *) * length);


More information about the Xquartz-changes mailing list