diff options
Diffstat (limited to 'test/xi2/protocol-common.c')
-rw-r--r-- | test/xi2/protocol-common.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c index fd93e15da..ad18042f9 100644 --- a/test/xi2/protocol-common.c +++ b/test/xi2/protocol-common.c @@ -27,6 +27,7 @@ #include <stdint.h> #include "extinit.h" /* for XInputExtensionInit */ +#include "exglobals.h" #include <glib.h> #include "protocol-common.h" @@ -107,7 +108,6 @@ ClientRec init_client(int len, void *data) /* we store the privates now and reassign it after the memset. this way * we can share them across multiple test runs and don't have to worry * about freeing them after each test run. */ - PrivateRec *privates = client.devPrivates; client.index = CLIENT_INDEX; client.clientAsMask = CLIENT_MASK; @@ -115,7 +115,7 @@ ClientRec init_client(int len, void *data) client.req_len = len; client.requestBuffer = data; - client.devPrivates = privates; + dixAllocatePrivates(&client.devPrivates, PRIVATE_CLIENT); return client; } @@ -136,6 +136,9 @@ void init_window(WindowPtr window, WindowPtr parent, int id) g_assert(window->optional); } +extern DevPrivateKeyRec miPointerScreenKeyRec; +extern DevPrivateKeyRec miPointerPrivKeyRec; + /* Needed for the screen setup, otherwise we crash during sprite initialization */ static Bool device_cursor_init(DeviceIntPtr dev, ScreenPtr screen) { return TRUE; } static Bool set_cursor_pos(DeviceIntPtr dev, ScreenPtr screen, int x, int y, Bool event) { return TRUE; } @@ -153,7 +156,13 @@ void init_simple(void) dixResetPrivates(); InitAtoms(); + XkbInitPrivates(); + XTestInitPrivates(); + dixRegisterPrivateKey(&XIClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XIClientRec)); + dixRegisterPrivateKey(&miPointerScreenKeyRec, PRIVATE_SCREEN, 0); + dixRegisterPrivateKey(&miPointerPrivKeyRec, PRIVATE_DEVICE, 0); XInputExtensionInit(); + init_window(&root, NULL, ROOT_WINDOW_ID); init_window(&window, &root, CLIENT_WINDOW_ID); |