DescriptionFlush Xlib output buffer after calling XUngrabServer
One of the horrors of using Xlib is its Output buffer. When calling Xlib
functions, the X command bitstream is not actually sent right away.
Commands are first queued up in the Xlib output buffer, and only sent over
the wire when the output buffer is flushed.
X clients typically don't have to worry about this, since (a) commands
that require return a response are flushed immediately, and
(b) they usually have an event loop that calls XPending() (XNextEvent(),
or XWindowEvent()), which does a Flush internally.
Chrome, however, listens to the Xserver fd, and only enters its XPending()
loop if the File Can be Read Without Blocking.
The quick and dirty fix is to just send an explicit XFlush() after
XUngrabServer().
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium:366125
TEST=tbd
R=msw@chromium.org
R=erg@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266455
Patch Set 1 #
Messages
Total messages: 11 (0 generated)
|