mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
(submit/xnest-cleanup-event-handler) Xnest: split off event handler
Tidy it up a bit and split the actual request handler from the request reading loop, making upcoming reworks easier to review (smaller diffs). Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -108,13 +108,10 @@ xnestQueueKeyEvent(int type, unsigned int keycode)
|
||||
QueueKeyboardEvents(xnestKeyboardDevice, type, keycode);
|
||||
}
|
||||
|
||||
void
|
||||
xnestCollectEvents(void)
|
||||
static void
|
||||
xnest_handle_event(XEvent X)
|
||||
{
|
||||
XEvent X;
|
||||
|
||||
while (XCheckIfEvent(xnestDisplay, &X, xnestNotExposurePredicate, NULL)) {
|
||||
switch (X.type) {
|
||||
switch (X.type) {
|
||||
case KeyPress:
|
||||
{
|
||||
xnestUpdateModifierState(X.xkey.state);
|
||||
@@ -239,6 +236,15 @@ xnestCollectEvents(void)
|
||||
default:
|
||||
ErrorF("xnest warning: unhandled event: %d\n", X.type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
xnestCollectEvents(void)
|
||||
{
|
||||
XEvent X;
|
||||
|
||||
while (XCheckIfEvent(xnestDisplay, &X, xnestNotExposurePredicate, NULL)) {
|
||||
xnest_handle_event(X);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user