Commit Graph

71 Commits

Author SHA1 Message Date
Simon Ser 4887f1a7aa build: add Meson fallback for wayland-protocols
This allows easily co-developing a Wayland protocol and Weston.
Example setup:

    ln -s subprojects/wayland-protocols /path/to/wayland-protocols
    meson configure build/ --force-fallback-for=wayland-protocols

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-04-21 11:29:48 +03:00
Marius Vlad 9e20730e04 screen-share: Start screen sharing even if no pointer is found
With commit e825fe38, we no longer display the pointer if no movement is
detected, which will cause screen share to fail to start if that is the
case. There could be also legitimate cases where there's no pointer, so
let's allow screen share to function in those cases as well. Makes uses
of previous helper methods to find a proper output to share in case we
don't have an pointer.

Re-uses the shell utils functions.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2022-04-20 19:45:25 +03:00
Daniel Stone 6cb2526b67 Move shell-utils to its own directory
shell-utils contains a number of helpers which are currently in use by
both desktop-shell and kiosk-shell. In order to extend this use to
fullscreen-shell as well (which can benefit from reusing the
weston_curtain infrastructure to be able to create solid-colour views
which may or may not be opaque, as well as one function within
fullscreen-shell which was copied wholesale to shell-utils), we need to
create a separate Meson dependency object, and avoid the existing
pattern of including the source from shared/ within the source list for
each shell.

This requires creating a new top-level directory for these shared helper
functions which are required by each shell, but are not part of
libweston in and of itself.

shell-utils depends on libweston-desktop; libweston-desktop depends on
libweston; libweston depends on shared.

Thus it is not possible to expose a dependency object from the shared/
directory which declares a dependency on the libweston-desktop
dependency, as Meson processes directories in order and resolves
variable references as they are parsed.

In order to break this deadlock, this commit creates a new top-level
directory called 'shell-utils' containing only this file, which can be
parsed by Meson after libweston-desktop (making the libweston-desktop
Meson dependency variable available to the build file to declare a
dependency on that), but before the shells (making the new Meson
depenendency object available to each shell which wishes to use it).

This commit contains no functional changes to any observable code.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2022-03-31 17:15:55 +00:00
Derek Foreman e6b8f5a5e4 remove wl_shell
This has been deprecated long enough, I think it's time to say goodbye.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2022-03-08 15:12:56 +02:00
Derek Foreman a96dfc7098 launchers: remove launchers
Moving forward we're going to be supporting libseat and logind as our
only launchers. We're doing this to reduce our maintenance burden,
and security impact.

Libseat supports all our existing use cases, and seatd can replace
weston-launch so we no longer have to carry a setuid-root program.

This patch removes weston-launch, and launcher-direct, leaving only
libseat and logind.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2022-03-03 16:54:14 -06:00
James Le Cuirot 89587db3cb meson.build: Fix -Dbackend-default=auto following fbdev deprecation
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
2022-02-23 15:57:57 +02:00
Marius Vlad 73b17da7d5 meson.build: Bump libweston major version
With commit 'compositor: Remove desktop zoom' weston_output_zoom was removed
from weston_output thus needing a libweston major bump.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2022-02-04 12:13:33 +02:00
Manuel Stoeckl b0ed4a2e3b gl-renderer: add support for (a|x)bgr16161616 shm formats
These formats are useful because they are often easier to produce
on CPU than half-float formats, and abgr16161616 has both >= 10bpc
color channels and adequate alpha, unlike abgr2101010.

The 16-bpc textures created from buffers with these formats require
the GL_EXT_texture_norm16 extension.

As WL_SHM_FORMAT_ABGR16161616 was introduced in libwayland 1.20,
update Weston's build requirements and CI.

The formats also needed to be registered in the pixel format table,
and defined in a fallback path if recent libdrm is not available.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
2022-02-02 11:58:58 +00:00
Simon Ser 2833c28ff1 build: re-open main for regular development 2022-02-01 23:16:03 +01:00
Simon Ser 4a03924604 build: bump to version 10.0.0 for the official release 2022-02-01 22:59:57 +01:00
Simon Ser 4ac64883d8 build: bump to version 9.0.93 for the RC1 release 2022-01-25 17:45:39 +01:00
Simon Ser 2839e61018 build: warn when enabling wl_shell support
Let's remind the user one more time that the option will go away
in the future.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-01-25 16:28:05 +00:00
Simon Ser 2c1ed289e6 build: bump to version 9.0.92 for the beta release 2022-01-12 15:03:11 +01:00
Simon Ser 1cca054ddb build: bump to version 9.0.91 for the alpha release 2021-12-14 15:07:47 +01:00
Simon Ser 413d210422 libweston-desktop: introduce a deprecated-wl-shell option
This is the first step towards removing wl_shell support.

Add an option so that users can toggle support for the deprecated
wl_shell protocol. This lets users test their clients to make sure
they work fine without wl_shell.

The option is set to false by default.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-07-23 17:22:22 +01:00
Marius Vlad 6f6fd2686d pixel-formats: Add human readable format modifier
Conditionally build support when libdrm is at least 2.4.107 to make use
of it.  Plug it in when printing out the buffer information.

With this in, we add a hard dependecy for libweston to link against
libdrm.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2021-07-22 22:19:17 +00:00
Pekka Paalanen cde58fd20a build: add -Wundef
There is no case in pre-processor directives where would like to have
undefined identifiers be silently replaced with a zero. This warning can
discover typos and forgotten includes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-03-12 16:14:28 +02:00
Pekka Paalanen 30104bd89a gl-renderer: support XYUV8888 wl_shm format
This support is added so that the XYUV shader variant can be tested with
wl_shm from the test suite.

Libwayland version requirement is bumped to get WL_SHM_FORMAT_XYUV8888.
Libwayland is bumped to 1.18 too in the CI image. libwayland-dev package
is dropped, because we build wayland anyway.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-02-25 14:36:24 +02:00
Pekka Paalanen d913363394 gl-renderer: move vertex shader into new file
This patch adds the tooling for incorporating files as C data, so that
files can be built into the binaries. The tool is in Python to avoid
adding extra dependencies like xxd.

xxd.py is copied from Mesa as-is, from commit
b729cd58d76f97f3fc04a67569535ee5ef2f5278 (master branch on 2021-01-26),
a.k.a 21.0-branchpoint-635-gb729cd58d76.

Moving the GLSL vertex shader into a separate file is not that
interesting, the purpose of this commit is to provide a simple
demonstration of the tooling. The real benefits come in a following
patch where the fragment shaders are re-written and externalized.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-02-25 13:16:02 +02:00
Pekka Paalanen c0565b61d3 build: bump Meson requirement to 0.52.1
Fixes: https://gitlab.freedesktop.org/wayland/weston/-/issues/296

The conclusion (quite a while ago, too) was that requiring Meson 0.52 is
fine. Mesa does that too. Bump the requirement to 0.52.1 which is the
last release of the 0.52 series.

This allows all issues listed in #296 to be worked on. It also allows
switching to TAP in the test suite for more detailed reports.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-02-15 11:17:17 +02:00
Pekka Paalanen a0f4a16132 libweston: bump major version to 10
Commit 32a5acde5b
"tests: add mechanism to change Weston's behavior when running certain
tests"

added a new field to struct weston_compositor. Since that struct is
still in the public header, this breaks ABI. Bump the library version
accordingly.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2020-10-27 13:27:05 +02:00
Heiko Thiery 526765ddfd Add EGL_NO_PLATFORM_SPECIFIC_TYPES to avoid Xlib.h via EGL headers
See: https://github.com/KhronosGroup/EGL-Registry/pull/111 discussion.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
2020-10-26 15:44:34 +01:00
Pekka Paalanen 9b94a7d833 Bump libdrm dependency to 2.4.95
96bef0517e "drm-backend: add support for
writeback connectors" started using DRM_MODE_CONNECTOR_WRITEBACK and
DRM_CLIENT_CAP_WRITEBACK_CONNECTORS. These were introduced in libdrm
2.4.95.

According to
https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/311
Ubunut Xenial is the only mentioned distribution that does not provide a
libdrm new enough. I think that is fine to drop now, 2016 was a good
while ago.

Libdrm 2.4.95 also introduced DRM_CLIENT_CAP_ASPECT_RATIO,
DRM_MODE_PICTURE_ASPECT_64_27, DRM_MODE_PICTURE_ASPECT_256_135.

The fallback definitions for the above are dropped.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2020-10-16 16:20:54 +00:00
Simon Ser a5570695c5
build: re-open master for regular development 2020-09-04 12:32:26 +02:00
Simon Ser 04d3ae265d
build: bump to version 9.0.0 for the official release 2020-09-04 12:20:00 +02:00
Simon Ser 13f501c51b
build: bump to version 8.0.93 for the RC1 release 2020-08-27 22:58:53 +02:00
Simon Ser 06d51cc4cb
build: bump to version 8.0.92 for the beta release 2020-08-13 21:09:40 +02:00
Simon Ser 905ddbb3b0
build: bump to version 9.0.91 for the alpha release 2020-07-30 22:56:04 +02:00
Alexandros Frantzis 87c1679a0a kiosk-shell: Introduce kiosk/fullscreen shell for desktop apps
kiosk-shell is fullscreen shell for apps that use the xdg-shell
protocol. The goal is to make life easier for people shipping embedded
devices with simple fullscreen shell requirements, and reduce the
proliferation of desktop-shell hacks.

Top level surfaces are made fullscreen, whereas dialogs are placed on
top in the center of the output and retain their natural sizes. Dialogs
can be moved and (un)maximized, but resizing is currently not supported.

An app can be directed to a particular output by populating the
"app-ids" field with the app's XDG app id, in the relevant
"[output]" section in the weston config file.

Fixes: #277

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
2020-07-30 14:38:49 +00:00
Pekka Paalanen 1618697dc3 build: add test-gl-renderer option
This shall be used by CI due to https://gitlab.freedesktop.org/mesa/mesa/issues/2219

It defaults to true, meaning that people by default will be running the
GL-renderer tests. It works fine on hardware drivers, just not llvmpipe.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2020-02-05 11:13:51 +00:00
Guillaume Champagne 556afd1482 meson: add -Wmissing-prototypes to the build
Meson's warning level maps to -Wall, -Wextra and -Wpedantic.
-Wmissing-prototypes is added by neither of those flag. Consequently,
it is manually added to the build command line arguments.

Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
2020-01-29 09:49:41 +00:00
Leandro Ribeiro 5976dbbbb5 weston-log: rename the confusing function name weston_compositor_add_log_scope()
There's a function named weston_compositor_add_log_scope()
but it doesn't take a struct weston_compositor argument.

Rename it to weston_log_ctx_add_log_scope(), as
the log_scope is being added to a log_context.

Also, bump libweston_major to 9.

Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
2020-01-27 13:42:42 -03:00
Simon Ser 3938b06159
build: re-open master for regular development 2020-01-24 21:20:02 +01:00
Simon Ser 33b06bdece
build: bump to version 8.0.0 for the official release 2020-01-24 21:04:40 +01:00
Pekka Paalanen 6510b2aba1 build: avoid Xlib.h via EGL headers
This should make EGL headers not pull in Xlib headers when no specific platform
define is in effect.

Use both the old Mesa-specific hack and the new official define EGL_NO_X11 to
have this work on both old and new EGL headers.

Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/350

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2020-01-24 14:56:04 +00:00
Simon Ser 0fa41030bb
build: bump to version 7.0.93 for the RC1 release 2020-01-17 23:18:24 +01:00
Simon Ser 105e0b9c27
build: bump to version 7.0.92 for the beta release 2019-12-20 18:39:33 +01:00
Simon Ser 404a84a03a
build: bump to version 7.0.91 for the alpha release 2019-12-06 20:30:51 +01:00
Daniel Stone 6093772f45 backend-drm: Use aspect-ratio bit definitions from libdrm
When the aspect-ratio-aware mode support was added to Weston, it was
done before the libdrm support was finalised and merged. Between it
being added to Weston and being merged, it changed to no longer provide
the offset for the bitmask.

Instead of using the mask and a compatible enum, if we update our
libdrm dependency, we can use the flag definitions directly from libdrm.

In 94e4068ba1, the libdrm dependency was bumped to 2.4.83, which
enabled us to remove a bunch of error-prone ifdefs by making atomic and
modifier support mandatory.

We determined in the discussion of !311 that it was safe to push the
dependency as high as 2.4.91, as that was what was available in major
distributions.

Bumping to 2.4.86 allows us to safely remove the ifdef and go with
upstream flags, as that was added in mesa/drm@0d889201d1.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2019-11-27 17:52:16 +00:00
Leandro Ribeiro 94e4068ba1 build: bump libdrm requirement to newer version (2.4.83)
There are some features that are available only if the user's libdrm version is
not too old: format modifiers require at least libdrm 2.4.71, atomic API at
least 2.4.78 and blob formats at least 2.4.83.

Bump libdrm to 2.4.83 (the oldest version that support these features) in order
to be able to remove ifdef checks and simplify the code. Major distributions
already support libdrm 2.4.91, so it's safe to apply this commit.

Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
2019-11-23 09:57:52 +00:00
Sebastian Wick fcc6ff74d4 input: bump wl_seat version to 6
New in version 6 are touch shape, touch orientation and axis source
wheel tilt. Weston doesn't support any of them yet but simply not
sending the new events and new enum value is sufficient to claim to
support this version.

Also bump the Wayland requirement to 1.17 to ensure both version 6 and 7
definitions are in the XML.

The reason for bumping to v6 without implementing the new features is
that we must support v7 to make use of struct ro_anonymous_file
introduced in the previous commit.

Signed-off-by: Sebastian Wick <sebastian@sebastianwick.net>
2019-11-04 15:10:04 +01:00
Pekka Paalanen 2f9ca27891 build: do not allow unresolved symbols
Now that all cases of unresolved symbols have been either fixed or worked
around pending for a proper fix, we can switch the project to disallow
unresolved symbols during build. This will help catch programming mistakes
earlier.

Note, that existing Meson build directories will not automatically apply this
change. If you have an existing build directory, you must issue

	meson configure -Db_lundef=true

in it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-10-24 13:40:51 +03:00
Emmanuel Gil Peyrot deae98ef45 shared: Use memfd_create() when available
This (so-far) Linux-only API lets users create file descriptors purely
in memory, without any backing file on the filesystem and the race
condition which could ensue when unlink()ing it.

It also allows seals to be placed on the file, ensuring to every other
process that we won’t be allowed to shrink the contents, potentially
causing a SIGBUS when they try reading it.

This patch is best viewed with the -w option of git log -p.

It is an almost exact copy of Wayland commit
6908c8c85a2e33e5654f64a55cd4f847bf385cae, see
https://gitlab.freedesktop.org/wayland/wayland/merge_requests/4

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
2019-10-24 07:32:17 +00:00
Marius Vlad 9bb1c3a3c2 weston-log: Add 'destroy_subscription' callback for the subscription
As 'new_subscription' can create additional objects, 'destroy_subscription'
will be needed when cleaning up.

As this requires a libweston_major bump (noticed by @pq), bump it up to
8.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Daniel Stone <daniel.stone@collabora.com>
2019-10-17 19:42:55 +03:00
Pekka Paalanen 4f5e360180 build: simplify include_directories
Define common_inc which includes both public_inc and the project root directory.
The project root directory will allow access to config.h and all the shared/
headers.

Replacing all custom '.', '..', '../..', '../shared' etc. include paths with
common_inc reduces clutter in the target definitions and enforces the common
 #include directive style, as e.g. including shared/ headers without the
subdirectory name no longer works.

Unfortunately this does not prevent one from using private libweston headers
with the usual include pattern for public headers.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-10-04 17:14:22 +03:00
Simon Ser 18e0cf85d6
build: reopen master for regular development 2019-08-24 00:14:35 +03:00
Simon Ser 3180fa8a12
build: bump to version 7.0.0 for the official release 2019-08-23 23:58:15 +03:00
Simon Ser 670ac1c0ed
build: bump to version 6.0.93 for the RC1 release 2019-08-16 18:48:51 +03:00
Simon Ser 1a3c6df5d5
build: bump to version 6.0.92 for the beta release 2019-08-02 19:11:52 +03:00
Quentin Glidic b5c70d791a meson: Use libweston-major versioning on protocols directory
To fully allow parallel-installation of libweston, we have to make sure
anything that is implemented in libweston is in a versioned directory.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2019-07-31 09:45:28 +00:00