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> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1661>
This commit is contained in:
parent
3597323d48
commit
0d3ae98661
|
@ -108,12 +108,9 @@ 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) {
|
||||
case KeyPress:
|
||||
{
|
||||
|
@ -240,5 +237,14 @@ xnestCollectEvents(void)
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue