summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-09-02 11:16:15 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-09-03 08:39:27 +1000
commit377a5f655ca88cd836da24ab42361df9f3ff51a2 (patch)
treebc6001f642d3fedc6230216663872c2ebd6033c2 /test
parent993ca5acbdccef9e43cd6580e7cc22cfda1a2578 (diff)
Xi: if XISetEventMask fails, return this to the client.
The only failure point can be a BadAlloc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test')
-rw-r--r--test/xi2/protocol-common.h2
-rw-r--r--test/xi2/protocol-xiselectevents.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/test/xi2/protocol-common.h b/test/xi2/protocol-common.h
index bf8b8754e..1ab35c92e 100644
--- a/test/xi2/protocol-common.h
+++ b/test/xi2/protocol-common.h
@@ -131,7 +131,7 @@ void init_simple(void);
/* Declarations for various overrides in the test files. */
void __wrap_WriteToClient(ClientPtr client, int len, void *data);
-void __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, unsigned char* mask);
+int __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, unsigned char* mask);
int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access);
int __real_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access);
Bool __wrap_AddResource(XID id, RESTYPE type, pointer value);
diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c
index 9782cff5c..f314462b5 100644
--- a/test/xi2/protocol-xiselectevents.c
+++ b/test/xi2/protocol-xiselectevents.c
@@ -62,8 +62,9 @@
static unsigned char *data[4096 * 16]; /* the request data buffer */
-void __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, unsigned char* mask)
+int __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, unsigned char* mask)
{
+ return Success;
}
/* dixLookupWindow requires a lot of setup not necessary for this test.