Commit Graph

9 Commits

Author SHA1 Message Date
Daniel Stone
86d73b2da2 tests: Ensure resource vs. client destroy handler order
Make sure that the client destroy handler runs strictly before the
resource destroy handler, which runs strictly before the client
late-destroy handler.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2022-10-20 11:26:22 +00:00
Daniel Stone
51d788de5b wayland-server: Add wl_client_add_destroy_late_listener
A late-destroy listener for a client is called after all the client's
resources have been destroyed and the destroy callbacks emitted. This
lives in parallel to the existing client destroy listener, called
immediately before the client's objects get destroyed.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: wayland/wayland#207
2022-10-20 11:26:22 +00:00
Daniel Stone
e886b456ab tests: Use bool for client test
A 0/1-only int is a bool.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2022-10-20 11:26:22 +00:00
Michael Forney
55d044810c Use wl_container_of internally
Rather than have two versions of the macro with slightly different
interfaces, just use wl_container_of internally.

This also removes use of statement expressions, a GNU C extension.

Signed-off-by: Michael Forney <mforney@mforney.org>
2019-06-05 09:58:14 +00:00
Bryce Harrington
773babedfc tests: Update boilerplate from MIT X11 license to MIT Expat license
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-12 15:31:24 -07:00
Kristian Høgsberg
d94a8722cb server: Make wl_object and wl_resource opaque structs
With the work to add wl_resource accessors and port weston to use them,
we're ready to make wl_resource and wl_object opaque structs.  We keep
wl_buffer in the header for EGL stacks to use, but don't expose it by
default.  In time we'll remove it completely, but for now it provides a
transition paths for code that still uses wl_buffer.

Reviewed-by: Jason Ekstrand<jason@jlekstrand.net>
2013-07-02 15:52:47 -04:00
Kristian Høgsberg
c450b6e23b tests: Include wayland-private.h for container_of 2012-10-21 10:04:17 -04:00
Dylan Noblesmith
b486e3aba5 tests: fix make check for out-of-tree builds
It was failing with missing include files.

While here, destroy the ugly "../src/..." include
paths used in the tests that was just hacking around
this problem in the Makefile:

sed -i s/..\\/src\\/// tests/*.c
2012-06-30 19:58:37 +00:00
Kristian Høgsberg
fa5f7b1191 server: Add client destroy signal 2012-04-13 09:53:15 -04:00