mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
tests: Refactor wraps into protocol-common.c
Part of refactoring the tests into a single binary, to make partial rebuild slightly faster and less verbose. Prepares for joining test/xi2/protocol-* into a single binary. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mihail Konev <k.mvc@ya.ru>
This commit is contained in:
committed by
Adam Jackson
parent
45546219e1
commit
ff66bca3e8
@@ -41,6 +41,7 @@
|
||||
|
||||
#include "protocol-common.h"
|
||||
|
||||
ClientRec client_window;
|
||||
static ClientRec client_request;
|
||||
static void reply_XIQueryPointer_data(ClientPtr client, int len,
|
||||
char *data, void *closure);
|
||||
@@ -50,26 +51,6 @@ static struct {
|
||||
WindowPtr win;
|
||||
} test_data;
|
||||
|
||||
/* dixLookupWindow requires a lot of setup not necessary for this test.
|
||||
* Simple wrapper that returns either one of the fake root window or the
|
||||
* fake client window. If the requested ID is neither of those wanted,
|
||||
* return whatever the real dixLookupWindow does.
|
||||
*/
|
||||
int
|
||||
__wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access)
|
||||
{
|
||||
if (id == root.drawable.id) {
|
||||
*win = &root;
|
||||
return Success;
|
||||
}
|
||||
else if (id == window.drawable.id) {
|
||||
*win = &window;
|
||||
return Success;
|
||||
}
|
||||
|
||||
return __real_dixLookupWindow(win, id, client, access);
|
||||
}
|
||||
|
||||
static void
|
||||
reply_XIQueryPointer(ClientPtr client, int len, char *data, void *closure)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user