diff options
author | Daniel Stone <daniel@fooishbar.org> | 2006-10-23 02:52:35 +0300 |
---|---|---|
committer | Daniel Stone <daniels@endtroducing.fooishbar.org> | 2006-10-23 02:52:35 +0300 |
commit | 2f33f4065d89ae2b6fdda43c7105d72f89920cae (patch) | |
tree | de4172bbe6cbffb3e91d48fce191bbd99b189984 /hw/xnest/Init.c | |
parent | 08928afb0500d46b0caa0a1d1244dee2ed80e6a0 (diff) |
Xnest: port to new input API
Port Xnest to Get{Pointer,Keyboard}Events, plus the new mieq API.
Diffstat (limited to 'hw/xnest/Init.c')
-rw-r--r-- | hw/xnest/Init.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index 8c397a7bb..5bf0300c6 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -45,6 +45,8 @@ is" without express or implied warranty. Bool xnestDoFullGeneration = True; +xEvent *xnestEvents = NULL; + void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) { @@ -92,10 +94,15 @@ InitInput(int argc, char *argv[]) xnestPointerDevice = AddInputDevice(xnestPointerProc, TRUE); xnestKeyboardDevice = AddInputDevice(xnestKeyboardProc, TRUE); + if (!xnestEvents) + xnestEvents = (xEvent *) xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + if (!xnestEvents) + FatalError("couldn't allocate room for events\n"); + RegisterPointerDevice(xnestPointerDevice); RegisterKeyboardDevice(xnestKeyboardDevice); - mieqInit((DevicePtr)xnestKeyboardDevice, (DevicePtr)xnestPointerDevice); + mieqInit(); AddEnabledDevice(XConnectionNumber(xnestDisplay)); |