weston/include/libweston
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
..
backend-drm.h Rename plugin-registry.h to libweston/plugin-registry.h 2019-04-18 12:31:46 +03:00
backend-fbdev.h Rename public backend headers 2019-04-18 12:31:46 +03:00
backend-headless.h headless, gl-renderer: support pbuffer outputs 2019-10-11 12:16:35 +00:00
backend-rdp.h backend-rdp: allow to force compression off 2019-06-20 16:39:13 +02:00
backend-wayland.h Rename public backend headers 2019-04-18 12:31:46 +03:00
backend-x11.h Rename public backend headers 2019-04-18 12:31:46 +03:00
config-parser.h Rename config-parser.h to libweston/config-parser.h 2019-04-18 12:31:46 +03:00
libweston.h Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
matrix.h Rename matrix.h to libweston/matrix.h 2019-04-18 12:31:46 +03:00
meson.build libweston: Remove timeline-object and clean-up 2019-10-17 21:42:25 +03:00
plugin-registry.h Rename plugin-registry.h to libweston/plugin-registry.h 2019-04-18 12:31:46 +03:00
version.h.in Rename version.h to libweston/version.h 2019-04-18 12:31:46 +03:00
weston-log.h weston-log: Add a subscription iterator 2019-10-17 19:42:55 +03:00
windowed-output-api.h Rename windowed-output-api.h to libweston/windowed-output-api.h 2019-04-18 12:31:46 +03:00
xwayland-api.h Rename xwayland-api.h to libweston/xwayland-api.h 2019-04-18 12:31:46 +03:00
zalloc.h Rename zalloc.h to libweston/zalloc.h 2019-04-18 12:31:46 +03:00