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

Jeremy Huddleston jeremyhu at freedesktop.org
Wed Jan 13 14:44:19 PST 2010


Rebased ref, commits from common ancestor:
commit 887debe6a66423e119815b00c02b5949dc4643bb
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 d385e07..6672cd3 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 4b7bcb7ee04d606126faa2ad30483ffc2f5be6f3
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 29ec89d..0f02157 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -194,6 +194,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));
 
@@ -251,6 +262,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;
@@ -395,7 +407,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;
@@ -820,5 +831,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 cf5b2427631f9e31d3ff72c19167b25ffdebcc6d
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 0ac95dcd2c2008bf8221b180dff85271f77418be
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