xserver: Branch 'master' - 2 commits

Keith Packard keithp at kemper.freedesktop.org
Tue Jul 10 23:14:00 PDT 2012


 Xext/sync.c   |    4 ++--
 dix/devices.c |    2 ++
 test/xtest.c  |    2 --
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 59c2c4f645b4d782599c274f4bc752de9623d308
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Tue Jul 10 09:10:22 2012 +0100

    AllocDevicePair: Ensure XKB privates are initialised
    
    Since we call directly into XKB and may be doing so before the extension
    has been initialised, make sure its privates are set up first.  XTest
    had a hack to do this itself, but seems cleaner to just make sure we do
    it in AllocDevicePair.
    
    Signed-off-by: Daniel Stone <daniel at fooishbar.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/dix/devices.c b/dix/devices.c
index 207b78b..9cf04ed 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -2674,6 +2674,8 @@ AllocDevicePair(ClientPtr client, const char *name,
 
     *ptr = *keybd = NULL;
 
+    XkbInitPrivates();
+
     pointer = AddInputDevice(client, ptr_proc, TRUE);
 
     if (!pointer)
diff --git a/test/xtest.c b/test/xtest.c
index 99e2185..402d9ce 100644
--- a/test/xtest.c
+++ b/test/xtest.c
@@ -76,8 +76,6 @@ xtest_init_devices(void)
     InitAtoms();
     SyncExtensionInit();
 
-    XkbInitPrivates();
-
     /* this also inits the xtest devices */
     InitCoreDevices();
 
commit f937c3d50157a9a42d2f2f10590b6b139ce18a29
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Tue Jul 10 09:10:21 2012 +0100

    Sync: Always initialise system counter list
    
    Sync is designed to let you add system counters before the extension has
    been initialised, which means the system counter list may well be full
    of bees.  Make sure it's initialised before we add to it, to avoid the
    risk of fatal injury.
    
    Signed-off-by: Daniel Stone <daniel at fooishbar.org>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/Xext/sync.c b/Xext/sync.c
index 8a333dd..b8f094d 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -951,6 +951,7 @@ SyncCreateSystemCounter(const char *name,
         if (RTCounter == 0) {
             return NULL;
         }
+        xorg_list_init(&SysCounterList);
     }
 
     pCounter = SyncCreateCounter(NULL, FakeClientID(0), initial);
@@ -2448,13 +2449,12 @@ SyncExtensionInit(void)
     ExtensionEntry *extEntry;
     int s;
 
-    xorg_list_init(&SysCounterList);
-
     for (s = 0; s < screenInfo.numScreens; s++)
         miSyncSetup(screenInfo.screens[s]);
 
     if (RTCounter == 0) {
         RTCounter = CreateNewResourceType(FreeCounter, "SyncCounter");
+        xorg_list_init(&SysCounterList);
     }
     RTAlarm = CreateNewResourceType(FreeAlarm, "SyncAlarm");
     RTAwait = CreateNewResourceType(FreeAwait, "SyncAwait");


More information about the xorg-commit mailing list