aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/test
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-16 20:45:15 +0100
committerMarc Haesen <marc@hc-consult.be>2011-12-16 20:45:15 +0100
commit47913e82955ec8e2b1ba4d4b145497dede9163b5 (patch)
treed23c322caf26864270171d54eb2805cee2721e4d /xorg-server/test
parent53d28537755790ee4625dc16f560cad5aa93f56b (diff)
downloadvcxsrv-47913e82955ec8e2b1ba4d4b145497dede9163b5.tar.gz
vcxsrv-47913e82955ec8e2b1ba4d4b145497dede9163b5.tar.bz2
vcxsrv-47913e82955ec8e2b1ba4d4b145497dede9163b5.zip
xserver git update 16 dec 2011
Diffstat (limited to 'xorg-server/test')
-rw-r--r--xorg-server/test/input.c130
-rw-r--r--xorg-server/test/xi2/protocol-eventconvert.c6
-rw-r--r--xorg-server/test/xi2/protocol-xipassivegrabdevice.c4
3 files changed, 70 insertions, 70 deletions
diff --git a/xorg-server/test/input.c b/xorg-server/test/input.c
index c44e5f613..d27b3f0c0 100644
--- a/xorg-server/test/input.c
+++ b/xorg-server/test/input.c
@@ -148,7 +148,7 @@ static void dix_check_grab_values(void)
memset(&client, 0, sizeof(client));
- param.grabtype = GRABTYPE_CORE;
+ param.grabtype = CORE;
param.this_device_mode = GrabModeSync;
param.other_devices_mode = GrabModeSync;
param.modifiers = AnyModifier;
@@ -531,22 +531,22 @@ static void dix_grab_matching(void)
memset(&b, 0, sizeof(b));
/* different grabtypes must fail */
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_XI2;
+ a.grabtype = CORE;
+ b.grabtype = XI2;
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI2;
+ a.grabtype = XI;
+ b.grabtype = XI2;
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_CORE;
+ a.grabtype = XI;
+ b.grabtype = CORE;
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
@@ -568,8 +568,8 @@ static void dix_grab_matching(void)
inputInfo.all_devices = &xi_all_devices;
inputInfo.all_master_devices = &xi_all_master_devices;
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
+ a.grabtype = XI2;
+ b.grabtype = XI2;
a.device = &dev1;
b.device = &dev2;
@@ -598,8 +598,8 @@ static void dix_grab_matching(void)
assert(rc == FALSE);
/* ignoreDevice FALSE must fail for different devices for CORE and XI */
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
+ a.grabtype = XI;
+ b.grabtype = XI;
a.device = &dev1;
b.device = &dev2;
a.modifierDevice = &dev1;
@@ -607,8 +607,8 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
+ a.grabtype = CORE;
+ b.grabtype = CORE;
a.device = &dev1;
b.device = &dev2;
a.modifierDevice = &dev1;
@@ -618,8 +618,8 @@ static void dix_grab_matching(void)
/* ignoreDevice FALSE must fail for different modifier devices for CORE
* and XI */
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
+ a.grabtype = XI;
+ b.grabtype = XI;
a.device = &dev1;
b.device = &dev1;
a.modifierDevice = &dev1;
@@ -627,8 +627,8 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
+ a.grabtype = CORE;
+ b.grabtype = CORE;
a.device = &dev1;
b.device = &dev1;
a.modifierDevice = &dev1;
@@ -637,8 +637,8 @@ static void dix_grab_matching(void)
assert(rc == FALSE);
/* different event type must fail */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
+ a.grabtype = XI2;
+ b.grabtype = XI2;
a.device = &dev1;
b.device = &dev1;
a.modifierDevice = &dev1;
@@ -650,8 +650,8 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&a, &b, TRUE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
+ a.grabtype = CORE;
+ b.grabtype = CORE;
a.device = &dev1;
b.device = &dev1;
a.modifierDevice = &dev1;
@@ -663,8 +663,8 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&a, &b, TRUE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
+ a.grabtype = XI;
+ b.grabtype = XI;
a.device = &dev1;
b.device = &dev1;
a.modifierDevice = &dev1;
@@ -677,8 +677,8 @@ static void dix_grab_matching(void)
assert(rc == FALSE);
/* different modifiers must fail */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
+ a.grabtype = XI2;
+ b.grabtype = XI2;
a.device = &dev1;
b.device = &dev1;
a.modifierDevice = &dev1;
@@ -692,23 +692,23 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
+ a.grabtype = CORE;
+ b.grabtype = CORE;
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
+ a.grabtype = XI;
+ b.grabtype = XI;
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
/* AnyModifier must fail for XI2 */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
+ a.grabtype = XI2;
+ b.grabtype = XI2;
a.modifiersDetail.exact = AnyModifier;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
@@ -717,8 +717,8 @@ static void dix_grab_matching(void)
assert(rc == FALSE);
/* XIAnyModifier must fail for CORE and XI */
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
+ a.grabtype = XI;
+ b.grabtype = XI;
a.modifiersDetail.exact = XIAnyModifier;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
@@ -726,8 +726,8 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
+ a.grabtype = CORE;
+ b.grabtype = CORE;
a.modifiersDetail.exact = XIAnyModifier;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
@@ -736,8 +736,8 @@ static void dix_grab_matching(void)
assert(rc == FALSE);
/* different detail must fail */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
+ a.grabtype = XI2;
+ b.grabtype = XI2;
a.detail.exact = 1;
b.detail.exact = 2;
a.modifiersDetail.exact = 1;
@@ -747,23 +747,23 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
+ a.grabtype = XI;
+ b.grabtype = XI;
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
+ a.grabtype = CORE;
+ b.grabtype = CORE;
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
/* detail of AnyModifier must fail */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
+ a.grabtype = XI2;
+ b.grabtype = XI2;
a.detail.exact = AnyModifier;
b.detail.exact = 1;
a.modifiersDetail.exact = 1;
@@ -773,23 +773,23 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
+ a.grabtype = CORE;
+ b.grabtype = CORE;
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
+ a.grabtype = XI;
+ b.grabtype = XI;
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
/* detail of XIAnyModifier must fail */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
+ a.grabtype = XI2;
+ b.grabtype = XI2;
a.detail.exact = XIAnyModifier;
b.detail.exact = 1;
a.modifiersDetail.exact = 1;
@@ -799,23 +799,23 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
+ a.grabtype = CORE;
+ b.grabtype = CORE;
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
+ a.grabtype = XI;
+ b.grabtype = XI;
rc = GrabMatchesSecond(&a, &b, FALSE);
assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == FALSE);
/* XIAnyModifier or AnyModifer must succeed */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
+ a.grabtype = XI2;
+ b.grabtype = XI2;
a.detail.exact = 1;
b.detail.exact = 1;
a.modifiersDetail.exact = XIAnyModifier;
@@ -825,8 +825,8 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == TRUE);
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
+ a.grabtype = CORE;
+ b.grabtype = CORE;
a.detail.exact = 1;
b.detail.exact = 1;
a.modifiersDetail.exact = AnyModifier;
@@ -836,8 +836,8 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == TRUE);
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
+ a.grabtype = XI;
+ b.grabtype = XI;
a.detail.exact = 1;
b.detail.exact = 1;
a.modifiersDetail.exact = AnyModifier;
@@ -848,8 +848,8 @@ static void dix_grab_matching(void)
assert(rc == TRUE);
/* AnyKey or XIAnyKeycode must succeed */
- a.grabtype = GRABTYPE_XI2;
- b.grabtype = GRABTYPE_XI2;
+ a.grabtype = XI2;
+ b.grabtype = XI2;
a.detail.exact = XIAnyKeycode;
b.detail.exact = 1;
a.modifiersDetail.exact = 1;
@@ -859,8 +859,8 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == TRUE);
- a.grabtype = GRABTYPE_CORE;
- b.grabtype = GRABTYPE_CORE;
+ a.grabtype = CORE;
+ b.grabtype = CORE;
a.detail.exact = AnyKey;
b.detail.exact = 1;
a.modifiersDetail.exact = 1;
@@ -870,8 +870,8 @@ static void dix_grab_matching(void)
rc = GrabMatchesSecond(&b, &a, FALSE);
assert(rc == TRUE);
- a.grabtype = GRABTYPE_XI;
- b.grabtype = GRABTYPE_XI;
+ a.grabtype = XI;
+ b.grabtype = XI;
a.detail.exact = AnyKey;
b.detail.exact = 1;
a.modifiersDetail.exact = 1;
diff --git a/xorg-server/test/xi2/protocol-eventconvert.c b/xorg-server/test/xi2/protocol-eventconvert.c
index dce1c50c4..e2037f911 100644
--- a/xorg-server/test/xi2/protocol-eventconvert.c
+++ b/xorg-server/test/xi2/protocol-eventconvert.c
@@ -59,7 +59,7 @@ static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent *out,
assert(out->type == GenericEvent);
assert(out->extension == 0); /* IReqCode defaults to 0 */
- assert(out->evtype == GetXI2Type((InternalEvent*)in));
+ assert(out->evtype == GetXI2Type(in->type));
assert(out->time == in->time);
assert(out->detail == in->detail.button);
assert(out->deviceid == in->deviceid);
@@ -305,7 +305,7 @@ static void test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent *out,
}
assert(out->extension == 0); /* IReqCode defaults to 0 */
- assert(out->evtype == GetXI2Type((InternalEvent*)in));
+ assert(out->evtype == GetXI2Type(in->type));
assert(out->time == in->time);
assert(out->detail == in->detail.button);
assert(out->length >= 12);
@@ -662,7 +662,7 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
assert(out->type == GenericEvent);
assert(out->extension == 0); /* IReqCode defaults to 0 */
- assert(out->evtype == GetXI2Type((InternalEvent*)in));
+ assert(out->evtype == GetXI2Type(in->type));
assert(out->time == in->time);
assert(out->deviceid == in->deviceid);
assert(out->sourceid == in->sourceid);
diff --git a/xorg-server/test/xi2/protocol-xipassivegrabdevice.c b/xorg-server/test/xi2/protocol-xipassivegrabdevice.c
index 1ffcdee97..89ffc3d29 100644
--- a/xorg-server/test/xi2/protocol-xipassivegrabdevice.c
+++ b/xorg-server/test/xi2/protocol-xipassivegrabdevice.c
@@ -49,7 +49,7 @@ struct test_data {
} testdata;
int __wrap_GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
- int button, GrabParameters *param, GrabType grabtype,
+ int button, GrabParameters *param, enum InputLevel grabtype,
GrabMask *mask);
static void reply_XIPassiveGrabDevice_data(ClientPtr client, int len, char *data, void *userdata);
@@ -69,7 +69,7 @@ int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access
}
int __wrap_GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
- int button, GrabParameters *param, GrabType grabtype,
+ int button, GrabParameters *param, enum InputLevel grabtype,
GrabMask *mask)
{
/* Fail every odd modifier */