spice/client
Hans de Goede f8c6e1c42a spicec-x11: Put locks around xlib calls which wait for a reply
Since libX11-1.3.4 the multi-threading handling code of libX11 has been
changed, see:
http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=933aee1d5c53b0cc7d608011a29188b594c8d70b

This causes several issues. One of them is the display inside the
client not getting updated when there are no XEvents being generated,
this is caused by the following part of the referenced commit message:

Caveats:
- If one thread is waiting for events and another thread tries to read a reply,
  both will hang until an event arrives. Previously, if this happened it might
  work sometimes, but otherwise would trigger either an assertion failure or
  a permanent hang.

We were depending on the otherwise behavior and apparently were lucky.
This can be seen by starting F14 in runlevel 3 and then doing startx
and not touching the mouse / keyb afterwards. Once you move the mouse
(generate an event you see the UI contents being updated but not before.

Another thing both I and Alon (iirc) have seen are hangs where 2
threads are stuck in XSync waiting for a reply simultaneously. This might
be related to libxcb version, according to the libX11 commit a libxcb
newer then 1.6 was needed, and my system had 1.5 at the time I saw this
after updating to libxcb 1.7 I can no longer reproduce.

This patch tackles both problems (and is needed for the 1st one
indepently of the 2nd one possibly being fixed) by adding XLockDisplay
calls around all libX11 calls which wait for a reply or an event.
2010-10-11 22:36:42 +02:00
..
gui Make distcheck work 2010-07-08 20:20:35 +02:00
windows spice-win: handle multiple types on clipboard grab send & receive 2010-10-11 17:29:46 +02:00
x11 spicec-x11: Put locks around xlib calls which wait for a reply 2010-10-11 22:36:42 +02:00
.gitignore fresh start 2009-10-14 15:06:41 +02:00
application.cpp client: support clipboard/selection-owner model (v2) 2010-10-01 16:06:10 +02:00
application.h client: support clipboard/selection-owner model (v2) 2010-10-01 16:06:10 +02:00
audio_channels.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
audio_devices.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
cache.hpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
canvas_utils.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
canvas.cpp Client: Use the autogenerated demarshallers 2010-06-18 16:32:11 +02:00
canvas.h Remove unused method declarations 2010-07-08 14:19:45 +02:00
client_net_socket.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
client_net_socket.h Fix spelling errors in comments and strings 2010-05-21 10:51:28 +02:00
cmd_line_parser.cpp client: Don't use basename for argv[0] in --help output 2010-09-29 12:40:48 +02:00
cmd_line_parser.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
common.h client: Include config.h from common.h 2010-09-29 13:26:21 +02:00
cursor_channel.cpp Make cursor data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
cursor_channel.h Make cursor data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
cursor.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
cursor.h Make all message structs internal to spice 2010-06-18 20:27:32 +02:00
debug.h Replace log4cpp with custom log function 2010-06-28 21:54:53 +02:00
demarshallers.h Generate marshaller/demarshallers for old protocol 2010-06-22 17:34:39 +02:00
display_channel.cpp Swap red and blue when decoding 0.4 mjpeg streams 2010-07-20 11:45:37 +02:00
display_channel.h detaching the screen when the primary surface is destoryed and closing the window if the primary surface is not recreated (the monitor has been detached). 2010-06-29 13:59:46 +02:00
event_sources.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
gdi_canvas.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
gl_canvas.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
glc.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
glz_decode_tmpl.c Fix spelling errors in comments and strings 2010-05-21 10:51:28 +02:00
glz_decoded_image.h Fix spelling errors in comments and strings 2010-05-21 10:51:28 +02:00
glz_decoder_config.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
glz_decoder_window.cpp spicec: Do not try to do accounting of pci memory 2010-10-09 22:27:53 +02:00
glz_decoder_window.h spicec: Do not try to do accounting of pci memory 2010-10-09 22:27:53 +02:00
glz_decoder.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
glz_decoder.h Move in spice/draw.h from spice-protocol to common/ 2010-07-08 13:56:01 +02:00
hot_keys.cpp Make CEGUI optional 2010-07-01 13:48:58 +02:00
hot_keys.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
icon.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
inputs_channel.cpp Fix various misspellings 2010-07-08 18:26:37 +02:00
inputs_channel.h Fix various misspellings 2010-07-08 18:26:37 +02:00
inputs_handler.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
jpeg_decoder.cpp JPEG support: introducing jpeg encoding for spice bitmaps 2010-06-09 11:40:25 +02:00
jpeg_decoder.h add eol after #ifdef in jpeg_encoder.h for n900 scratchbox compiler 2010-07-29 11:10:41 +03:00
lines.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
lz.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Makefile.am Make distcheck work 2010-07-08 20:20:35 +02:00
marshaller.cpp Generate and link marshallers into client 2010-06-18 20:27:32 +02:00
marshallers.h Fix build error due to member "SpiceMsgEmpty" same name as type 2010-06-28 12:45:07 +02:00
mem.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
menu.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
menu.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
mjpeg_decoder.cpp client: Include config.h from common.h 2010-09-29 13:26:21 +02:00
mjpeg_decoder.h Swap red and blue when decoding 0.4 mjpeg streams 2010-07-20 11:45:37 +02:00
monitor.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
monitor.h Fix inclusion of common files, no need for common/ part 2010-07-08 15:44:15 +02:00
pixels_source.h Fix inclusion of common files, no need for common/ part 2010-07-08 15:44:15 +02:00
pixman_utils.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
platform.h spicec: Move setting of clipboard_owner to guest to platform code 2010-10-06 19:17:08 +02:00
playback_channel.cpp Make sound data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
process_loop.cpp Fix spelling errors in comments and strings 2010-05-21 10:51:28 +02:00
process_loop.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
quic.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
read_write_mutex.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
record_channel.cpp Convert client to use indirect calls for message marshalling 2010-06-22 10:54:59 +02:00
red_channel.cpp codegen: Various cleanups 2010-07-19 16:28:22 +02:00
red_channel.h Fix various misspellings 2010-07-08 18:26:37 +02:00
red_client.cpp spicec: Do not try to do accounting of pci memory 2010-10-09 22:27:53 +02:00
red_client.h spicec: don't send agent messages directly from ClipboardListener callbacks 2010-10-06 19:17:08 +02:00
red_drawable.h Add helper to compare RedDrawable::Formats for copy compabible 2010-04-23 16:36:35 +02:00
red_gdi_canvas.cpp applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00
red_gdi_canvas.h Make client canvas and pixmaps handle more formats and simplify 2010-04-23 16:36:35 +02:00
red_gl_canvas.cpp applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00
red_gl_canvas.h Remove all mentions of "cairo" from the code 2010-05-03 12:38:02 +02:00
red_key.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
red_peer.cpp Fix various misspellings 2010-07-08 18:26:37 +02:00
red_peer.h Fix various misspellings 2010-07-08 18:26:37 +02:00
red_pixmap_gdi.h Remove all mentions of "cairo" from the code 2010-05-03 12:38:02 +02:00
red_pixmap_gl.h Make client canvas and pixmaps handle more formats and simplify 2010-04-23 16:36:35 +02:00
red_pixmap_sw.h Remove all mentions of "cairo" from the code 2010-05-03 12:38:02 +02:00
red_pixmap.h Add RedDrawable::Format get_format() 2010-04-23 16:36:35 +02:00
red_sw_canvas.cpp applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00
red_sw_canvas.h Remove all mentions of "cairo" from the code 2010-05-03 12:38:02 +02:00
red_types.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
red_window.h Make opengl optional, disabled by default 2010-06-21 14:50:18 +02:00
region.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
rop3.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
screen_layer.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
screen_layer.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
screen.cpp Make opengl optional, disabled by default 2010-06-21 14:50:18 +02:00
screen.h Make opengl optional, disabled by default 2010-06-21 14:50:18 +02:00
shared_cache.hpp support for lossy images in the pixmap cache and fill bits 2010-06-09 11:41:01 +02:00
sw_canvas.cpp Remove all mentions of "cairo" from the code 2010-05-03 12:38:02 +02:00
threads.cpp client: Fall back to gettimeofday if clock_gettime not found 2010-09-29 13:35:18 +02:00
threads.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
tunnel_channel.cpp codegen: Various cleanups 2010-07-19 16:28:22 +02:00
tunnel_channel.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
utils.cpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
utils.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
zlib_decoder.cpp applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00
zlib_decoder.h applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00