Skip to content

Commit fef11cf

Browse files
author
Eoin Mcloughlin
committed
Fix event polling loop with SCOPE demodulator
XNextEvent blocks while no events are available. The first time the child display process enters process_keystrokes(), it loops forever inside x_getkey() and never gets to update the display.
1 parent fbd17aa commit fef11cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xdisplay.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ static char *x_getkey(void)
114114

115115
if (!display)
116116
return NULL;
117-
while (XNextEvent(display, &evt) == 0) {
117+
while (XCheckWindowEvent(display, window, KeyPressMask |
118+
StructureNotifyMask | ExposureMask, &evt)) {
118119
switch (evt.type) {
119120
case KeyPress:
120121
i = XLookupString((XKeyEvent *)&evt, kbuf,

0 commit comments

Comments
 (0)