Flush 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 Review URL: https://codereview.chromium.org/246723006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266455 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment