aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/Xext/sync.c4
-rw-r--r--xorg-server/dix/devices.c10
-rw-r--r--xorg-server/test/xtest.c2
3 files changed, 9 insertions, 7 deletions
diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c
index 8a333dd3a..b8f094db5 100644
--- a/xorg-server/Xext/sync.c
+++ b/xorg-server/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");
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 839de35aa..9cf04ed3f 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -1890,6 +1890,7 @@ ProcGetPointerMapping(ClientPtr client)
* the ClientPointer could change. */
DeviceIntPtr ptr = PickPointer(client);
ButtonClassPtr butc = ptr->button;
+ int nElts;
int rc;
REQUEST_SIZE_MATCH(xReq);
@@ -1898,15 +1899,16 @@ ProcGetPointerMapping(ClientPtr client)
if (rc != Success)
return rc;
+ nElts = (butc) ? butc->numButtons : 0;
rep = (xGetPointerMappingReply) {
.type = X_Reply,
- .nElts = (butc) ? butc->numButtons : 0,
+ .nElts = nElts,
.sequenceNumber = client->sequence,
- .length = ((unsigned) rep.nElts + (4 - 1)) / 4
+ .length = ((unsigned) nElts + (4 - 1)) / 4
};
WriteReplyToClient(client, sizeof(xGetPointerMappingReply), &rep);
if (butc)
- WriteToClient(client, (int) rep.nElts, &butc->map[1]);
+ WriteToClient(client, nElts, &butc->map[1]);
return Success;
}
@@ -2672,6 +2674,8 @@ AllocDevicePair(ClientPtr client, const char *name,
*ptr = *keybd = NULL;
+ XkbInitPrivates();
+
pointer = AddInputDevice(client, ptr_proc, TRUE);
if (!pointer)
diff --git a/xorg-server/test/xtest.c b/xorg-server/test/xtest.c
index 99e218541..402d9ceba 100644
--- a/xorg-server/test/xtest.c
+++ b/xorg-server/test/xtest.c
@@ -76,8 +76,6 @@ xtest_init_devices(void)
InitAtoms();
SyncExtensionInit();
- XkbInitPrivates();
-
/* this also inits the xtest devices */
InitCoreDevices();