xserver-multidpi/hw
Jon TURNEY b4a08e642b hw/xwin: Improve reliability of clipboard X->Windows pastes
Sometimes, particularly with large clipboard pastes to Windows, we could end up
waiting for the timeout to expire, rather than pasting the data.

Various changes to improve reliability:

1. Use XFlush() not XSync() in winProcessXEventsTimeout().

It makes no sense to ensure we have received replies to outstanding requests if
we are going to wait for them using select()

2. Add XFlush() to winClipboardProc()

Make sure we have sent any requests before we wait using select()

3. Don't use FD_ISSET() to check which fd is ready

This looks like a Cygwin select() bug in that it sometimes returns 0 with an
empty fd set before the timeout expires, but a fd appears to be ready.

Add select() return value to debug output when we are warning that this has
happened.

4. Drain event queues before entering select()

Unconditionally drain event queues before entering select().  This seems to be
the recommended way of writing select() and X event processing loops.

winClipboardFlushXEvents() checks using XPending(), and
winClipboardFlushWindowsMessageQueue() checks using PeekMessage() so this is
safe against blocking, but means that may not need to enter select() at all
sometimes.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-11-09 14:22:48 +00:00
..
dmx dix: Always store GC client clip as a region (v2) 2014-10-27 15:46:05 -04:00
kdrive dix: Always store GC client clip as a region (v2) 2014-10-27 15:46:05 -04:00
vfb vfb: Don't reimplement micmap so much 2014-10-08 10:10:39 +02:00
xfree86 xfree86: Bump ABI versions (video: 19, extension: 9) 2014-10-30 13:57:16 -07:00
xnest dix: Always store GC client clip as a region (v2) 2014-10-27 15:46:05 -04:00
xquartz xquartz: Remove useless DRIWindowExposures 2014-10-08 16:01:35 +02:00
xwayland xwayland: always include drm.xml in tarballs 2014-09-18 15:07:20 -07:00
xwin hw/xwin: Improve reliability of clipboard X->Windows pastes 2014-11-09 14:22:48 +00:00
Makefile.am Xwayland DDX 2014-04-03 15:19:22 -07:00