diff options
author | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
commit | 81f91c615982e50bb62708201569c33a3cd3d973 (patch) | |
tree | 4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/Xi/queryst.c | |
parent | b571a562410f565af2bdde52d9f7f9a23ffae04f (diff) | |
parent | a915739887477b28d924ecc8417ee107d125bd6c (diff) | |
download | vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2 vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip |
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/Xi/queryst.c')
-rw-r--r-- | xorg-server/Xi/queryst.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xorg-server/Xi/queryst.c b/xorg-server/Xi/queryst.c index 21de843f3..60ec32ec9 100644 --- a/xorg-server/Xi/queryst.c +++ b/xorg-server/Xi/queryst.c @@ -32,8 +32,6 @@ from The Open Group. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif @@ -44,6 +42,8 @@ from The Open Group. #include <X11/extensions/XIproto.h> #include "exevents.h" #include "exglobals.h" +#include "xkbsrv.h" +#include "xkbstr.h" #include "queryst.h" @@ -85,7 +85,7 @@ ProcXQueryDeviceState(ClientPtr client) xValuatorState *tv; xQueryDeviceStateReply rep; DeviceIntPtr dev; - int *values; + double *values; REQUEST(xQueryDeviceStateReq); REQUEST_SIZE_MATCH(xQueryDeviceStateReq); @@ -128,7 +128,8 @@ ProcXQueryDeviceState(ClientPtr client) tk = (xKeyState *) buf; tk->class = KeyClass; tk->length = sizeof(xKeyState); - tk->num_keys = k->curKeySyms.maxKeyCode - k->curKeySyms.minKeyCode + 1; + tk->num_keys = k->xkbInfo->desc->max_key_code - + k->xkbInfo->desc->min_key_code + 1; for (i = 0; i < 32; i++) tk->keys[i] = k->down[i]; buf += sizeof(xKeyState); @@ -160,7 +161,7 @@ ProcXQueryDeviceState(ClientPtr client) } rep.num_classes = num_classes; - rep.length = (total_length + 3) >> 2; + rep.length = bytes_to_int32(total_length); WriteReplyToClient(client, sizeof(xQueryDeviceStateReply), &rep); if (total_length > 0) WriteToClient(client, total_length, savbuf); |