do check for keyboard input and handle it.
/* Wait till there is something to do */
Available = input_wait_mask;
- /* We used to have && wait_for_cell == 0
- but that led to lossage handling selection_request events:
- within one, we would start to handle another. */
- if (! XINT (read_kbd))
+ if (! XINT (read_kbd) || wait_for_cell != 0)
FD_CLR (keyboard_descriptor, &Available);
/* If frame size has changed or the window is newly mapped,