Use the proper function to exit instead of the libwayland one, to allow main
handle_exit() to be called.
This is just to unify the exit paths.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Use the proper function to exit instead of the libwayland one, to allow main
handle_exit() to be called.
This is just to unify the exit paths.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Use the proper weston_compositor_exit API instead of wl_display_terminate() to
allow the compositor main to prepare for exit, and most importantly to set the
exit error code as appropriate.
I have some brokenness in my test suite running, and weston-desktop-shell was
crashing at start, yet the tests did not notice. With this patch, the tests
where the helper crashes are properly marked as failed.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This is so that, for instance, people using weston as their main Wayland
compositor can invert the sense of two finger scrolling or change
pointer acceleration using weston.ini, rather than having to edit C
code.
All of the options that libinput itself exposes through its API are now
exposed in weston.ini. The new options are called `tap-and-drag`,
`tap-and-drag-lock`, `disable-while-typing`, `middle-emulation`,
`left-handed`, `rotation`, `accel-profile`, `accel-speed`,
`scroll-method`, `natural-scroll`, and `scroll-button`. I have
successfully tested everything except for `rotation`, out of a lack of
hardware support.
weston now depends directly on libevdev for turning button name strings into
kernel input codes. This was needed for the `scroll-button` config
option. (weston already depends indirectly on libevdev through
libinput, so I figured people would be OK with this.) As a practical
matter for debian-style packagers, weston now has a build dependency on
libevdev-dev.
Right now, the code applies the same options to all attached devices
that a given option is relevant for. There are plans for multiple
[libinput] sections, each with different device filters, for users who
need more control here.
Signed-off-by: Eric Toombs <3672-ewtoombs@users.noreply.gitlab.freedesktop.org>
This is to increase consistency in config option naming in weston.ini.
(Prefer hyphens over underscores to separate words.)
If enable_tap is present in weston.ini, an obnoxious error message is
logged with weston_log(). In terms of configuration, if enable-tap is
present, enable_tap is ignored.
Signed-off-by: Eric Toombs <3672-ewtoombs@users.noreply.gitlab.freedesktop.org>
Since the Meson install step is not written to try to set the suid bit
automatically, remind the user that weston-launch needs to be
setuid-root to work.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
This attempts to wake up secondary framebuffer devices
(/dev/fb1 and up) as usually these devices start powered off, and
the FBIOPUT_VSCREENINFO ioctl turns it on. This was tested on qemu
with two virtual QXL cards. This is a more precise way to activate
framebuffer devices with the ioctl
Correct the path to the build directory so we can capture Meson logs;
especially useful when tests fail like in #184.
An example of this change having been run with a deliberately-failing
test, capturing the Meson logs, can be found at:
https://gitlab.freedesktop.org/daniels/weston/-/jobs/94623
Signed-off-by: Daniel Stone <daniels@collabora.com>
Pixman can be used for rendering if the default GLESv2 rendering
is broken or cannot be used.
Pixman-based rendering is already available with the command-line
switch '--use-pixman'. This patch adds support for this option to
the configuration file. Putting
[core]
use-pixman=true
into 'weston.ini' enables pixman-based rendering for all backends
that support it. With this change, pixman has to be enabled only
once.
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/27
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Avoid crashes related to get_shell_surface returning NULL.
Surfaces are already allowed to be neither focus nor shell in
e.g. focus_state_surface_destroy.
This will cause gbm_surface_create_with_modifiers to fail on drivers
where modifiers are not yet supported (e.g. amdgpu). We need to make
sure we only end up using gbm_surface_create in this case.
This fixes the remoting plugin on these drivers.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
In patch 5d767416c1 we simplified a bit the way in which the
compositing mode was being printed with the purpose to improve
weston-debug. It seems we forgot to use the mode when RENDER-only mode
is being used, so this patch fixes that.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Add missing drm_plane_state_put_back in case the view's pixel format
does not match any of the tested plane's supported formats.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Otherwise CI might fail due to
https://github.com/mesonbuild/meson/issues/4718 but the fix isn't
included in any release yet, so install meson from the 0.49 branch.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This is probably the most annoying ones. Some distributions do not even package
a libdrm_${driver} if the driver's hardware does not occur on the CPU
architecture, e.g. Debian x86_64 does not have libdrm_etnaviv.
Helps people to disable those.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Render a moving square instead of just clearing the buffer, to help
uncover rendering issues (e.g. modifier-related issues) which may not be
visible with a simple glClear.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Take into account format modifiers advertised by the compositor and the
EGL implementation and supported by the buffer creation mechanism, to
select the optimal buffer modifier.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
The buffer-count test was added in
40c0c3f91e and removed in
4938f93f57, but the removal left around
the dependency to EGL headers in weston-test.c.
Removal of those unneeded includes allows us to drop the EGL dependency
completely from weston-test.c build.
For the Meson build this means that there are no dependency('egl')
directives anymore without the user friendly error message.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Helps people avoid wayland-egl if they don't want it.
Makes the check for wayland-egl explicit on the site instead of relying
on gl-renderer checking for it.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Check the egl, glesv2 and gbm dependencies locally instead of relying on
the dep_* variables from the top level meson.build or
libweston/meson.build (dep_gbm).
This should make these dependencies now explicitly checked when the app
is built, rather than relying on other components doing the checks. If
the drm-backend was disabled, this would have probably hit an error
using the undeclared variable dep_gbm.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Helps people to avoid EGL and GLESv2 if they do not want them.
Stops using dep_egl and dep_glesv2 so that the human friendly error
message is alongside the dependency() statement, so that the message and
the statement can later be merged together once Meson offers the custom
error messages feature or something even more sophisticated.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Use the pattern to avoid identing everything, when everything in the
file is under the one conditional.
Helps readability.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Add human-friendly error message.
Cairo is a hard dependency on the whole at least because tests seem to
require it, but this will help if someone adds an option to disable
building tests to get rid of Cairo.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Cannot use dependency() directly in the structure, because it will
execute regardless of the option. Instead, let's store the dependency
name in the structure and use the same logic as with simple_clients to
conditionally look for the dependencies.
As a bonus, this brings friendly error messages to demo-clients
dependencies.
subsurfaces' dependencies are also converted to maintain consistency
with simple_clients.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Remove IN_WESTON in favour of the already defined UNIT_TEST which is
used to modify a compilation unit to expose more functions for unit
tests to prod at.
Originally IN_WESTON meant that compilation unit was being compiled for
use in the Weston compositor, but it probably never really did anything
more than change what WL_EXPORT means in matrix.c.
This patch not only simplifies the logic, but it fixes the Meson build
of test-matrix: IN_WESTON was defined there even when matrix.c was being
built outside of Weston, which caused it to depend on libwayland
headers, which were not included in the Meson build of test-matrix.
Test-matrix has no reason to depend in libwayland in any way, so this
patch fixes that.
Reported-by: Greg V <greg@unrelenting.technology>
Signed-off-by: Pekka Paalanen <pq@iki.fi>