aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/test/xi2
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-21 09:10:35 +0200
committermarha <marha@users.sourceforge.net>2012-05-21 09:10:35 +0200
commitf543ceaca6820260f15a4eff86938214cf43c7d2 (patch)
treed66901c0385bd008ba46600be695c500daa78c8f /xorg-server/test/xi2
parent062c45ff0df6a52080dcd74433710d47127cbe29 (diff)
downloadvcxsrv-f543ceaca6820260f15a4eff86938214cf43c7d2.tar.gz
vcxsrv-f543ceaca6820260f15a4eff86938214cf43c7d2.tar.bz2
vcxsrv-f543ceaca6820260f15a4eff86938214cf43c7d2.zip
fontconfig mesa xkeyboard-config xserver pixman git update 21 Mar 2012
Diffstat (limited to 'xorg-server/test/xi2')
-rw-r--r--xorg-server/test/xi2/protocol-common.h4
-rw-r--r--xorg-server/test/xi2/protocol-xipassivegrabdevice.c7
-rw-r--r--xorg-server/test/xi2/protocol-xiquerydevice.c16
-rw-r--r--xorg-server/test/xi2/protocol-xiquerypointer.c7
-rw-r--r--xorg-server/test/xi2/protocol-xiqueryversion.c8
-rw-r--r--xorg-server/test/xi2/protocol-xiselectevents.c1
-rw-r--r--xorg-server/test/xi2/protocol-xisetclientpointer.c1
-rw-r--r--xorg-server/test/xi2/protocol-xiwarppointer.c1
8 files changed, 24 insertions, 21 deletions
diff --git a/xorg-server/test/xi2/protocol-common.h b/xorg-server/test/xi2/protocol-common.h
index 04a1e8990..f27f248c6 100644
--- a/xorg-server/test/xi2/protocol-common.h
+++ b/xorg-server/test/xi2/protocol-common.h
@@ -33,8 +33,6 @@
#ifndef PROTOCOL_COMMON_H
#define PROTOCOL_COMMON_H
-extern int BadDevice;
-
/* Check default values in a reply */
#define reply_check_defaults(rep, len, type) \
{ \
@@ -83,7 +81,7 @@ struct devices {
int num_devices;
int num_master_devices;
-} devices;
+};
/**
* The set of default devices available in all tests if necessary.
diff --git a/xorg-server/test/xi2/protocol-xipassivegrabdevice.c b/xorg-server/test/xi2/protocol-xipassivegrabdevice.c
index 53c65bda6..84b386bf3 100644
--- a/xorg-server/test/xi2/protocol-xipassivegrabdevice.c
+++ b/xorg-server/test/xi2/protocol-xipassivegrabdevice.c
@@ -37,6 +37,7 @@
#include "scrnintstr.h"
#include "xipassivegrab.h"
#include "exevents.h"
+#include "exglobals.h"
#include "protocol-common.h"
@@ -54,7 +55,7 @@ int __wrap_GrabButton(ClientPtr client, DeviceIntPtr dev,
GrabParameters *param, enum InputLevel grabtype,
GrabMask *mask);
static void reply_XIPassiveGrabDevice_data(ClientPtr client, int len,
- char *data, void *userdata);
+ char *data, void *closure);
int
__wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access)
@@ -85,7 +86,7 @@ __wrap_GrabButton(ClientPtr client, DeviceIntPtr dev,
}
static void
-reply_XIPassiveGrabDevice(ClientPtr client, int len, char *data, void *userdata)
+reply_XIPassiveGrabDevice(ClientPtr client, int len, char *data, void *closure)
{
xXIPassiveGrabDeviceReply *rep = (xXIPassiveGrabDeviceReply *) data;
@@ -107,7 +108,7 @@ reply_XIPassiveGrabDevice(ClientPtr client, int len, char *data, void *userdata)
static void
reply_XIPassiveGrabDevice_data(ClientPtr client, int len, char *data,
- void *userdata)
+ void *closure)
{
int i;
diff --git a/xorg-server/test/xi2/protocol-xiquerydevice.c b/xorg-server/test/xi2/protocol-xiquerydevice.c
index 5e59e8084..9d13bbb6f 100644
--- a/xorg-server/test/xi2/protocol-xiquerydevice.c
+++ b/xorg-server/test/xi2/protocol-xiquerydevice.c
@@ -32,6 +32,7 @@
#include <X11/Xatom.h>
#include "inputstr.h"
#include "extinit.h"
+#include "exglobals.h"
#include "scrnintstr.h"
#include "xkbsrv.h"
@@ -54,9 +55,9 @@ struct test_data {
};
static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data,
- void *userdata);
+ void *closure);
static void reply_XIQueryDevice(ClientPtr client, int len, char *data,
- void *userdata);
+ void *closure);
/* reply handling for the first bytes that constitute the reply */
static void
@@ -86,10 +87,10 @@ reply_XIQueryDevice(ClientPtr client, int len, char *data, void *userdata)
/* reply handling for the trailing bytes that constitute the device info */
static void
-reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *userdata)
+reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *closure)
{
int i, j;
- struct test_data *querydata = (struct test_data *) userdata;
+ struct test_data *querydata = (struct test_data *) closure;
DeviceIntPtr dev;
xXIDeviceInfo *info = (xXIDeviceInfo *) data;
@@ -222,7 +223,7 @@ reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *userdata)
any->type == XIValuatorClass);
if (any->type == XIButtonClass) {
- int len;
+ int l;
xXIButtonInfo *bi = (xXIButtonInfo *) any;
if (client->swapped)
@@ -230,10 +231,9 @@ reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *userdata)
assert(bi->num_buttons == devices.vcp->button->numButtons);
- len =
- 2 + bi->num_buttons +
+ l = 2 + bi->num_buttons +
bytes_to_int32(bits_to_bytes(bi->num_buttons));
- assert(bi->length == len);
+ assert(bi->length == l);
}
else if (any->type == XIValuatorClass) {
xXIValuatorInfo *vi = (xXIValuatorInfo *) any;
diff --git a/xorg-server/test/xi2/protocol-xiquerypointer.c b/xorg-server/test/xi2/protocol-xiquerypointer.c
index 4756a6b2e..fc66b6429 100644
--- a/xorg-server/test/xi2/protocol-xiquerypointer.c
+++ b/xorg-server/test/xi2/protocol-xiquerypointer.c
@@ -37,12 +37,13 @@
#include "scrnintstr.h"
#include "xiquerypointer.h"
#include "exevents.h"
+#include "exglobals.h"
#include "protocol-common.h"
static ClientRec client_request;
static void reply_XIQueryPointer_data(ClientPtr client, int len,
- char *data, void *userdata);
+ char *data, void *closure);
static struct {
DeviceIntPtr dev;
@@ -70,7 +71,7 @@ __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access)
}
static void
-reply_XIQueryPointer(ClientPtr client, int len, char *data, void *userdata)
+reply_XIQueryPointer(ClientPtr client, int len, char *data, void *closure)
{
xXIQueryPointerReply *rep = (xXIQueryPointerReply *) data;
SpritePtr sprite;
@@ -121,7 +122,7 @@ reply_XIQueryPointer(ClientPtr client, int len, char *data, void *userdata)
}
static void
-reply_XIQueryPointer_data(ClientPtr client, int len, char *data, void *userdata)
+reply_XIQueryPointer_data(ClientPtr client, int len, char *data, void *closure)
{
reply_handler = reply_XIQueryPointer;
}
diff --git a/xorg-server/test/xi2/protocol-xiqueryversion.c b/xorg-server/test/xi2/protocol-xiqueryversion.c
index 1347e866c..aff023754 100644
--- a/xorg-server/test/xi2/protocol-xiqueryversion.c
+++ b/xorg-server/test/xi2/protocol-xiqueryversion.c
@@ -59,10 +59,10 @@ struct test_data {
};
static void
-reply_XIQueryVersion(ClientPtr client, int len, char *data, void *userdata)
+reply_XIQueryVersion(ClientPtr client, int len, char *data, void *closure)
{
xXIQueryVersionReply *rep = (xXIQueryVersionReply *) data;
- struct test_data *versions = (struct test_data *) userdata;
+ struct test_data *versions = (struct test_data *) closure;
unsigned int sver, cver, ver;
if (client->swapped) {
@@ -85,10 +85,10 @@ reply_XIQueryVersion(ClientPtr client, int len, char *data, void *userdata)
}
static void
-reply_XIQueryVersion_multiple(ClientPtr client, int len, char *data, void *userdata)
+reply_XIQueryVersion_multiple(ClientPtr client, int len, char *data, void *closure)
{
xXIQueryVersionReply *rep = (xXIQueryVersionReply *) data;
- struct test_data *versions = (struct test_data *) userdata;
+ struct test_data *versions = (struct test_data *) closure;
reply_check_defaults(rep, len, XIQueryVersion);
assert(rep->length == 0);
diff --git a/xorg-server/test/xi2/protocol-xiselectevents.c b/xorg-server/test/xi2/protocol-xiselectevents.c
index 4daba8775..8f6b947d4 100644
--- a/xorg-server/test/xi2/protocol-xiselectevents.c
+++ b/xorg-server/test/xi2/protocol-xiselectevents.c
@@ -55,6 +55,7 @@
#include "windowstr.h"
#include "extinit.h" /* for XInputExtensionInit */
#include "scrnintstr.h"
+#include "exglobals.h"
#include "xiselectev.h"
#include "protocol-common.h"
diff --git a/xorg-server/test/xi2/protocol-xisetclientpointer.c b/xorg-server/test/xi2/protocol-xisetclientpointer.c
index 51db4ac69..90f1b94c3 100644
--- a/xorg-server/test/xi2/protocol-xisetclientpointer.c
+++ b/xorg-server/test/xi2/protocol-xisetclientpointer.c
@@ -44,6 +44,7 @@
#include "scrnintstr.h"
#include "xisetclientpointer.h"
#include "exevents.h"
+#include "exglobals.h"
#include "protocol-common.h"
diff --git a/xorg-server/test/xi2/protocol-xiwarppointer.c b/xorg-server/test/xi2/protocol-xiwarppointer.c
index c279ac413..4bea333c3 100644
--- a/xorg-server/test/xi2/protocol-xiwarppointer.c
+++ b/xorg-server/test/xi2/protocol-xiwarppointer.c
@@ -37,6 +37,7 @@
#include "scrnintstr.h"
#include "xiwarppointer.h"
#include "exevents.h"
+#include "exglobals.h"
#include "protocol-common.h"