weston/xwayland
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
..
dnd.c xwm: dnd does not need cairo-util.h 2019-10-04 15:56:19 +03:00
hash.c Make config.h inclusion consistent 2016-06-16 11:01:54 -07:00
hash.h include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
launcher.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
meson.build build: separate deps for int and ext libweston users 2019-10-24 13:29:33 +03:00
selection.c log: remove "%m" from format strings by using strerror(errno) 2019-05-02 22:10:30 +02:00
window-manager.c Unify the include style of shared/ headers 2019-10-04 16:04:48 +03:00
xwayland-internal-interface.h xwayland: add set_toplevel_with_position to internal API 2017-01-18 13:21:02 +02:00
xwayland.h xwm: no need for compositor/weston.h 2019-10-04 17:14:22 +03:00