diff options
author | marha <marha@users.sourceforge.net> | 2012-07-11 12:00:44 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-07-11 12:00:44 +0200 |
commit | db967c2b0fd8506b9e1cf7574d5fb927bec786c5 (patch) | |
tree | 5444de1e304af7b5ae8c4b590a08b1b5964c7eca /xorg-server/dix/devices.c | |
parent | 6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab (diff) | |
parent | 0bef135026040688be97af98cc99cc82f93838e8 (diff) | |
download | vcxsrv-db967c2b0fd8506b9e1cf7574d5fb927bec786c5.tar.gz vcxsrv-db967c2b0fd8506b9e1cf7574d5fb927bec786c5.tar.bz2 vcxsrv-db967c2b0fd8506b9e1cf7574d5fb927bec786c5.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/dix/devices.c
Diffstat (limited to 'xorg-server/dix/devices.c')
-rw-r--r-- | xorg-server/dix/devices.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index b9225a195..2d5f6150e 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -1897,6 +1897,7 @@ ProcGetPointerMapping(ClientPtr client) * the ClientPointer could change. */ DeviceIntPtr ptr = PickPointer(client); ButtonClassPtr butc = ptr->button; + int nElts; int rc; REQUEST_SIZE_MATCH(xReq); @@ -1905,15 +1906,16 @@ ProcGetPointerMapping(ClientPtr client) if (rc != Success) return rc; + nElts = (butc) ? butc->numButtons : 0; rep.type = X_Reply; - rep.nElts = (butc) ? butc->numButtons : 0; + rep.nElts = nElts; rep.sequenceNumber = client->sequence; - rep.length = ((unsigned) rep.nElts + (4 - 1)) / 4; + rep.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; } @@ -2677,6 +2679,8 @@ AllocDevicePair(ClientPtr client, const char *name, *ptr = *keybd = NULL; + XkbInitPrivates(); + pointer = AddInputDevice(client, ptr_proc, TRUE); if (!pointer) |