aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/devices.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-11 11:56:57 +0200
committermarha <marha@users.sourceforge.net>2012-07-11 11:56:57 +0200
commit0bef135026040688be97af98cc99cc82f93838e8 (patch)
treee92b0a40e98bbd566e64ac507a5b3d2acf397c7b /xorg-server/dix/devices.c
parentd137057fd13e83ec15ab416c7fe774741da06047 (diff)
downloadvcxsrv-0bef135026040688be97af98cc99cc82f93838e8.tar.gz
vcxsrv-0bef135026040688be97af98cc99cc82f93838e8.tar.bz2
vcxsrv-0bef135026040688be97af98cc99cc82f93838e8.zip
mesa xserver pixman git update 11 Jul 2012
Diffstat (limited to 'xorg-server/dix/devices.c')
-rw-r--r--xorg-server/dix/devices.c10
1 files changed, 7 insertions, 3 deletions
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)