mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-10-25 13:30:42 +00:00
Read all pending X11 events during input handling
This commit is contained in:
1 parent
f79a99bc05
commit
697bee2954
1 file changed
+2
-3
+2
-3
@@ -46,13 +46,11 @@ static Cursor cursor;
|
|||||||
static bool grabbed = True;
|
static bool grabbed = True;
|
||||||
|
|
||||||
static int x11_handler(int fd) {
|
static int x11_handler(int fd) {
|
||||||
if (!XPending(display))
|
|
||||||
return LOOP_OK;
|
|
||||||
|
|
||||||
XEvent event;
|
XEvent event;
|
||||||
int button = 0;
|
int button = 0;
|
||||||
int motion_x, motion_y;
|
int motion_x, motion_y;
|
||||||
|
|
||||||
|
while (XPending(display)) {
|
||||||
XNextEvent(display, &event);
|
XNextEvent(display, &event);
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
@@ -127,6 +125,7 @@ static int x11_handler(int fd) {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return LOOP_OK;
|
return LOOP_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user