weston/compositor
Pekka Paalanen 6ffbba3ac1 Use weston_compositor_add_destroy_listener_once() in plugins
This introduces a new convention of checking through the compositor destroy
listener if the plugin is already initialized. If the plugin is already
initialized, then the plugin entry function succeeds as a no-op. This makes it
safe to load the same plugin multiple times in a running compositor.

Currently module loading functions return failure if a plugin is already
loaded, but that will change in the future. Therefore we need this other method
of ensuring we do not double-initialize a plugin which would lead to list
corruptions the very least.

All plugins are converted to use the new helper, except:
- those that do not have a destroy listener already, and
- hmi-controller which does the same open-coded as the common code pattern
  did not fit there.

Plugins should always have a compositor destroy listener registered since they
very least allocate a struct to hold their data. Hence omissions are
highlighted in code.

Backends do not need this because weston_compositor_load_backend() already
protects against double-init. GL-renderer does not export a standard module
init function so cannot be initialized the usual way and therefore is not
vulnerable to double-init.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-11-21 16:32:55 +00:00
..
cms-colord.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
cms-helper.c Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
cms-helper.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
cms-static.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
executable.c compositor: turn weston main() into a lib 2019-10-24 13:40:51 +03:00
main.c compositor: Fix some warning when passing debugoptimized to meson 2019-11-14 10:54:40 +02:00
meson.build Link Weston plugins to libexec-weston.so 2019-10-24 13:40:51 +03:00
screen-share.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
systemd-notify.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
text-backend.c Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
weston-screenshooter.c weston-debug: Rename weston-debug to weston-log to better reflect its purpose 2019-07-18 10:49:39 +03:00
weston.desktop Remove dbus-launch from weston.desktop 2017-01-18 12:21:57 +00:00
weston.h compositor: turn weston main() into a lib 2019-10-24 13:40:51 +03:00
xwayland.c log: remove "%m" from format strings by using strerror(errno) 2019-05-02 22:10:30 +02:00