wayland/src
Jonas Ådahl 6d29c0da3c client: Introduce proxy wrappers
Using the libwayland-client client API with multiple threads with
thread local queues are prone to race conditions.

The problem is that one thread can read and queue events after another
thread creates a proxy but before it sets the queue.

This may result in the event to the proxy being silently dropped, or
potentially dispatched on the wrong thread had the creating thread set
the implementation before setting the queue.

This patch introduces API to solve this case by introducing "proxy
wrappers". In short, a proxy wrapper is a wl_proxy struct that will
never itself proxy any events, but may be used by the client to set a
queue, and use it instead of the original proxy when sending requests
that creates new proxies. When sending requests, the wrapper will
work in the same way as the normal proxy object, but the proxy created
by sending a request (for example wl_display.sync) will inherit to the
same proxy queue as the wrapper.

https://bugs.freedesktop.org/show_bug.cgi?id=91273

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2016-04-29 15:58:23 +03:00
..
.gitignore ignore: Add *.dtd.embed 2016-03-10 22:24:20 -08:00
connection.c connection: remove redundant assignment 2016-04-23 11:38:20 +08:00
dtddata.S scanner: avoid executable stack 2016-03-02 12:05:28 +02:00
event-loop.c event-loop: remove extra header 2015-11-16 11:42:01 -08:00
scanner.c scanner: move include directives before extern "C" wrapper 2016-04-19 11:06:49 +03:00
scanner.mk Rename source subdir from wayland to src 2011-08-12 16:25:14 -04:00
wayland-client-core.h client: Introduce proxy wrappers 2016-04-29 15:58:23 +03:00
wayland-client-uninstalled.pc.in build: add uninstalled pkg-config files 2012-05-29 10:09:59 -04:00
wayland-client.c client: Introduce proxy wrappers 2016-04-29 15:58:23 +03:00
wayland-client.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-client.pc.in Export the Wayland protocol XML file 2013-09-21 21:48:56 -07:00
wayland-egl-core.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-egl.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-os.c src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-os.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-private.h server: Add an API to get the file descriptor for a client 2016-01-19 14:52:54 -08:00
wayland-scanner-uninstalled.pc.in build: Add wayland-scanner.pc. 2013-07-03 16:38:12 -04:00
wayland-scanner.pc.in build: Add wayland-scanner.pc. 2013-07-03 16:38:12 -04:00
wayland-server-core.h server: move include directives before extern "C" wrapper 2016-04-19 11:42:54 +03:00
wayland-server-uninstalled.pc.in build: add uninstalled pkg-config files 2012-05-29 10:09:59 -04:00
wayland-server.c Revert "server: validate resource versions at creation time" 2016-02-18 18:23:05 -06:00
wayland-server.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-server.pc.in Export the Wayland protocol XML file 2013-09-21 21:48:56 -07:00
wayland-shm.c shm: Log a warning if a shm buffer address is requested when it may be invalid 2016-03-08 16:55:02 -08:00
wayland-util.c cosmetic: use tabs instead of spaces 2016-02-04 16:37:34 -08:00
wayland-util.h utils: move include directives before extern "C" wrapper 2016-04-19 11:46:49 +03:00
wayland-version.h.in src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00