Commit Graph

50 Commits

Author SHA1 Message Date
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
Simon Ser 04f7646dee
build: bump to version 6.0.91 for the alpha release 2019-07-19 19:03:05 +03:00
Michael Olbrich d5d5aa91a2 Add pipewire plugin
It is quite similar to the remoting plugin. It just exports the frames via
pipewire instead of the builtin GStreamer pipeline.
It implements the same virtual output API. Virtual outputs can be created
by adding 'pipewire-output' sections to weston.ini.

The generated frames can be accessed with any pipewire client. e.g. with
GStreamer:

gst-launch-1.0 pipewiresrc ! video/x-raw,format=BGRx ! ...

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
2019-07-19 08:01:55 +02:00
Marius Vlad bbf6ea0b4f build: Add sphinx/breathe support for generating documentation
This is adds basic configuration files for doxygen and for breathe,
which is a doxygen-to-sphinx bridge that can document C symbols.

Breathe is configured with default project 'weston' and implicitly adds
:members: and :undoc-members: to breathe configuration options.
This allows a shorter way to call breathe directives without the need
specify the project and also to display implicitly all the members,
documented or not.

A 'docs' run_target to force the docs to be re-built has been added.
Initially (the first time the build system is ran) the documentation
will automatically be built, but later re-builds will require the use of
the 'docs' target. This avoid further delays in building weston but in
the same time allows the possiblity to update/improve the documentation
bits to those who want that.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2019-06-25 14:05:54 +00:00
Daniel Stone e2f9c1b76c Default build to warning_level=3
After suppressing the pedantic errors, we can now enable a higher
warning_level by default, so developers can catch warnings earlier.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2019-06-11 14:00:39 +01:00
Daniel Stone 34473d703f build: Suppress 'pedantic' GCC warnings
GCC's 'pedantic' warnings warn about a bunch of things which are true of
ISO C but not the toolchains we care about (GCC, Clang). Suppress those
warnings to allow us to build with Meson's warning_level=3.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2019-06-11 13:59:37 +01:00
Pekka Paalanen cda1488ce0 Rename version.h to libweston/version.h
This is an installed public header, and without the subdir would surely
conflict with something else.

include/libweston/meson.build is necessary for putting the generated header in
the right subdirectory so that '#include <libweston/version.h>' can work.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-04-18 12:31:46 +03:00
Pekka Paalanen a78cf77582 Rename timeline-object.h to libweston/timeline-object.h
This patch sets up the stage for similarly renaming compositor.h which will
justify this. That patch will be big, so moving timeline-object.h first makes
it easy to see the changes to the build and install directives.

This and all the following moves essentially break the API, so libweston major
is bumped.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-04-18 12:31:45 +03:00
Pekka Paalanen 53c37fa347 build: remove dir_include
It was unused.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-04-18 12:30:03 +03:00
Pekka Paalanen 4ab901ebb0 libweston: fix protocol install path
These protocols are from libweston, not weston.
Even the pkg-config files is called libweston-6-protocols.pc.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-04-18 12:30:03 +03:00
Harish Krupo b81fc517d8 meson.build: Fix warning for configure_file
We claim to support meson versions >= 0.47 but the `install:` argument
in configure_file was introduced in version 0.50. This produces the
following meson warning:

WARNING: Project specifies a minimum meson_version '>= 0.47' but uses
features which were added in newer versions:
 * 0.50.0: {'install arg in configure_file'}

From the documentation for the install argument [1]:
" When omitted it (install) defaults to true when install_dir is set and
not empty, false otherwise."

So, remove the `install:` argument and just depend on `install_dir` for
installing.

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

[1] https://mesonbuild.com/Reference-manual.html#configure_file

Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>
2019-04-16 10:51:36 +05:30
Pekka Paalanen 9912d8295d build: reopen master for regular development
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-03-28 10:50:11 +02:00
Derek Foreman ea5ea00d58 configure.ac/meson.build: bump version to 6.0.0 for the official release 2019-03-27 20:11:52 -05:00
Derek Foreman cc64cc3717 configure.ac/meson.build: bump to version 5.0.94 for the RC2 release 2019-03-20 19:49:58 -05:00
Pekka Paalanen cd6bf210a4 libweston: bump major to 6
At least the following commits break the libweston ABI, strictly speaking:
- a5630eafec
- ce62cb3d05
- 195dadeb2a
- c18ffd3939
- ea54c2fda6
- 27d7c395c7
- acff29b3b3
- 676296749a
- c9c247730b
- 65e1be1234

Furhtermore, 64fbd0f41f break the weston
executable exported ABI.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-02-15 18:33:25 +00:00
Eric Toombs 6e229ca263 weston: add more libinput config options
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>
2019-02-06 08:23:02 +00:00
Eric Engestrom 29a6803817 Revert "meson: fix -Wno-foo argument testing"
This reverts commit bc315aa288

Turns out since meson 0.46 it knows about this quirk of compilers and
checks the right thing internally.

See https://github.com/mesonbuild/meson/pull/2284
2019-01-10 15:38:00 +00:00
Pekka Paalanen 43a42920cf meson: better error for wayland-backend wl-egl dep
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>
2018-12-31 15:16:53 +02:00
Pekka Paalanen 4b29ffddaa meson: contain and check simple-dmabuf-egl deps
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>
2018-12-31 15:16:53 +02:00
Pekka Paalanen a23ce29506 build: replace IN_WESTON with UNIT_TEST
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>
2018-12-20 23:53:54 +00:00
Eric Engestrom bc315aa288 meson: fix -Wno-foo argument testing
gcc and clang ignore `-Wno-foo` arguments nowadays, so we need to
test the positive variant instead.
2018-12-13 17:05:31 +00:00
Daniel Stone 8011b0fa03 Add Meson build system
Meson is a build system, currently implemented in Python, with multiple
output backends, including Ninja and Make. The build file syntax is
clean and easy to read unlike autotools. In practise, configuring and
building with Meson and Ninja has been observed to be much faster than
with autotools. Also cross-building support is excellent.

More information at http://mesonbuild.com

Since moving to Meson requires some changes from users in any case, we
took this opportunity to revamp build options. Most of the build options
still exist, some have changed names or more, and a few have been
dropped. The option to choose the Cairo flavour is not implemented since
for the longest time the Cairo image backend has been the only
recommended one.

This Meson build should be fully functional and it installs everything
an all-enabled autotools build does. Installed pkg-config files have
some minor differences that should be insignificant. Building of some
developer documentation that was never installed with autotools is
missing.

It is expected that the autotools build system will be removed soon
after the next Weston release.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2018-12-09 14:50:54 +02:00