Wayland signals (wl_signal) do not reliably handle changes to the
notification list during signal emission. Such scenarios occasionally
come up and can be difficult to investigate and debug.
This commit introduces the weston_signal_emit_mutable() function which can be
used in place of wl_signal_emit() and safely implements the following
behavior regarding notification list changes:
1. Listeners deleted during a signal emission and which have not already been
notified at the time of deletion are not notified by that emission.
2. Listeners added during signal emission are ignored by that emission.
The implementation of weston_signal_emit_mutable() is copied from the
wlr_signal_emit_safe() function of the wlroots project.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Implement a simple register and lookup for function tables. This is
intended for plugins to expose APIs to other plugins.
It has been very hard to arrange a plugin to be able to call into
another plugin without modifying Weston core to explicitly support each
case. This patch fixes that.
The tests all pass.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com>
This patch adds a new command line option which can be
used to tell headless backend not to create any
virtual outputs.
This will be used for output hotplug emulation, where
weston will start with no outputs available, and the
virtual output will be created at runtime.
v2:
- Use bool instead of int for the indicator flag
- Move final newspace to a separate line in command
line options
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
This clarifies what is supposed to be the libweston code.
v2: screen-share.c is already in compositor/ instead.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
Acked-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: rebased]
refactor configuration API of headless-backend
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
v6:
- Define version number in the header
- Don't use leading underscores in header guards
- Add stub config_init_to_defaults()
- Allocate config on stack
- Drop unused display_name parameter
- Add error message when config is invalid
- Install compositor-headless.h and list it in headless-backend sources
v5:
- Update to current trunk
- Fixed typo 'struct weston_wayland_backend_config'
- Dropped unused variables
- Dropped weston_headless_backend_config_create() in favor of
directly zalloc'ing the object
- Dropped weston_headless_backend_load() in favor of the more
generalized load_backend_new().
- Dropped typedef from header
- Restored use of 'backend_init' entry point
- Backend_init() takes a base weston_backend_config object
- Renamed 'param' to 'config' in a few places for consistency
- Renamed 'headless_options' variable to 'options for consistency
- Version the base struct
- Free config on error
- Don't free config during backend_init normal operations
- Adjust header ordering
- Make header guard naming consistent with other headers
- Light reformatting for code style and consistency with other
backend config patches
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
[Pekka: rebased to apply before drm and x11 backends]
[Pekka: squashed in the headless part of "Enforce destruction of all
backend config objects after initialization"]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
weston-launch starts weston and provides mechanism
for weston to set/drop drm master, open a tty,
and read input devices without being root.
Execution is allowed for local-active sessions
or users in the group weston-launch.
This rename addresses a few problems around the split between core
Wayland and the wayland-demos repository.
1) Initially, we had one big repository with protocol code, sample
compositor and sample clients. We split that repository to make it
possible to implement the protocol without pulling in the sample/demo
code. At this point, the compositor is more than just a "demo" and
wayland-demos doesn't send the right message. The sample compositor
is a useful, self-contained project in it's own right, and we want to
move away from the "demos" label.
2) Another problem is that the wayland-demos compositor is often
called "the wayland compsitor", but it's really just one possible
compositor. Existing X11 compositors are expected to add Wayland
support and then gradually phase out/modularize the X11 support, for
example. Conversely, it's hard to talk about the wayland-demos
compositor specifically as opposed to, eg, the wayland protocol or a
wayland compositor in general.
We are also renaming the repo to weston, and the compositor
subdirectory to src/, to emphasize that the main "output" is the
compositor.
Besides the new header file, there's also a change in the main evdev creation
procedure for a more suggestive name (evdev_input_add_devices ->
evdev_input_create). There's no real functional changes in this commit.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>