xserver: Branch 'master' - 2 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Sun Feb 22 00:41:59 PST 2009


 hw/xquartz/quartz.c         |    4 +++-
 hw/xquartz/quartzKeyboard.c |   35 +++++++++++++----------------------
 2 files changed, 16 insertions(+), 23 deletions(-)

New commits:
commit 9531b96470a2fd812eb3fa0d1e10419331842496
Author: Jeremy Huddleston <jeremy at yuffie.local>
Date:   Sun Feb 22 00:41:52 2009 -0800

    XQuartz: DefineInitialRootWindow is gone

diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 1f0b004..0de63b6 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -276,7 +276,9 @@ static void QuartzUpdateScreens(void) {
     pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
     //pScreen->PaintWindowBackground (pRoot, &pRoot->borderClip,  PW_BACKGROUND);
     miPaintWindow(pRoot, &pRoot->borderClip,  PW_BACKGROUND);
-    DefineInitialRootWindow(pRoot);
+
+//  TODO: This is a noop in 1.6 and nuked in master... we may need to do something else now to handle it
+//    DefineInitialRootWindow(pRoot);
 
     DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, dixScreenOrigins[pScreen->myNum].x, dixScreenOrigins[pScreen->myNum].y);
 
commit c7c50157b5137a147e69abb70b43a28fac4a9ffa
Author: Jeremy Huddleston <jeremy at yuffie.local>
Date:   Sun Feb 22 00:29:48 2009 -0800

    XQuartz: quartzKeyboard compile fixes for recent XKB Changes
    
    Seems we're less divorced from XKB than we'd like for now... hopefully not having any rules installed will still let us override things the way we want to...

diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 020b6a6..a7b6709 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -296,12 +296,13 @@ static void DarwinLoadKeyboardMapping(KeySymsRec *keySyms) {
 static void DarwinKeyboardSetDeviceKeyMap(KeySymsRec *keySyms, CARD8 *modmap) {
     DeviceIntPtr pDev;
 
+    pthread_mutex_lock(&keyInfo_mutex);
     for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
         if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key)
-            XkbApplyMappingChange(pDev, XkbKeySymsMask | XkbModifierMapMask,
-                                  keysyms, keysyms.minKeyCode,
-                                  keysyms.maxKeyCode - keysyms.minKeyCode + 1,
+            XkbApplyMappingChange(pDev, keySyms, keySyms->minKeyCode,
+                                  keySyms->maxKeyCode - keySyms->minKeyCode + 1,
                                   modmap, serverClient);
+    pthread_mutex_unlock(&keyInfo_mutex);
 }
 
 /*
@@ -315,6 +316,7 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
     XkbComponentNamesRec names;
     CFIndex value;
     BOOL ok;
+    XkbRMLVOSet rmlvo;
 
     // Open a shared connection to the HID System.
     // Note that the Event Status Driver is really just a wrapper
@@ -325,20 +327,9 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
 
     bzero(&names, sizeof(names));
 
-    /* We need to really have rules... or something... */
-    //XkbSetRulesDflts("base", "pc105", "us", NULL, NULL);
-    
-    pthread_mutex_lock(&keyInfo_mutex);
-    assert(XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, QuartzBell,
-                                       DarwinChangeKeyboardControl));
-    assert(keyInfo.modMap!=NULL);
-    pthread_mutex_unlock(&keyInfo_mutex);
-
-    pthread_mutex_lock(&keyInfo_mutex);
-    assert( InitKeyboardDeviceStruct( (DevicePtr)pDev, &keySyms,
-                                      QuartzBell,
-                                      DarwinChangeKeyboardControl ));
-    pthread_mutex_unlock(&keyInfo_mutex);
+    XkbGetRulesDflts(&rmlvo);
+    InitKeyboardDeviceStruct(pDev, &rmlvo, QuartzBell,
+                             DarwinChangeKeyboardControl);
 
     /* Get our key repeat settings from GlobalPreferences */
     (void)CFPreferencesAppSynchronize(CFSTR(".GlobalPreferences"));
@@ -366,13 +357,13 @@ void DarwinKeyboardReloadHandler(int screenNum, xEventPtr xe, DeviceIntPtr pDev,
     KeySymsRec keySyms;
 
     DEBUG_LOG("DarwinKeyboardReloadHandler\n");
-    if (pDev->key) {
-        if (pDev->key->curKeySyms.map) xfree(pDev->key->curKeySyms.map);
-        xfree(pDev->key);
-    }
+//    if (pDev->key) {
+//        if (pDev->key->curKeySyms.map) xfree(pDev->key->curKeySyms.map);
+//        xfree(pDev->key);
+//    }
 
     DarwinLoadKeyboardMapping(&keySyms);
-    DarwinKeyboardSetDeviceKeyMap(&keySyms);
+    DarwinKeyboardSetDeviceKeyMap(&keySyms, keyInfo.modMap);
 }
 
 //-----------------------------------------------------------------------------


More information about the xorg-commit mailing list