Pekka Paalanen [Fri, 5 Apr 2019 09:28:14 +0000 (12:28 +0300)]
build: make backlight a helper lib
Right now only used by the DRM-backend, but there is a test program that should
use this as well.
This helps with building the test program and moving DRM-backend into a
subdirectory.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 5 Apr 2019 09:04:58 +0000 (12:04 +0300)]
build: make libinput-backend a helper lib
Rather than having fbdev and drm backends include the libinput files ad hoc,
wrap them in a static library. Using the dependency object for that helper
library will then automatically pull in any necerray include dirs for the
users.
This helps with moving the backends into subdirectories.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Marius Vlad [Tue, 30 Apr 2019 17:26:32 +0000 (20:26 +0300)]
build: libweston doesn't need -export-dynamic
According to https://gitlab.freedesktop.org/wayland/weston/merge_requests/159#note_148104
it doesn't make sense to use export-dynamic on libraries.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Marius Vlad [Mon, 29 Apr 2019 10:33:54 +0000 (13:33 +0300)]
include: Install weston-debug header
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Mon, 29 Apr 2019 10:27:47 +0000 (13:27 +0300)]
libweston: Add weston-debug header to libweston
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Wed, 17 Apr 2019 10:50:28 +0000 (13:50 +0300)]
weston-debug: Remove weston_compositor from weston_log_context
This is no longer needed. Also assert if the context passed is NULL and
compositor log context is already set.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Wed, 17 Apr 2019 10:47:06 +0000 (13:47 +0300)]
libweston: Rename weston_debug_scope_ to weston_log_scope_
Rename also the functions which work on weston_log_scope.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Wed, 17 Apr 2019 10:05:38 +0000 (13:05 +0300)]
libweston: Rename weston_debug_scope to weston_log_scope
This is a continuation of the previous patch to align more closely to
the weston log framework.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Wed, 17 Apr 2019 09:35:38 +0000 (12:35 +0300)]
libweston: Rename weston_debug_compositor to weston_log_context
As we transition towards a more generic API for weston loggging
framework rename weston_debug_compositor to weston_log_context to show
the fact that this is not really debug but a logging context.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Sun, 7 Apr 2019 16:07:16 +0000 (19:07 +0300)]
compositor: Convert weston-debug framework to use weston_debug_compositor
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Sun, 7 Apr 2019 14:07:58 +0000 (17:07 +0300)]
libweston: Decouple weston_debug_compositor from weston_compositor
This patch allows initialization of weston-debug/log framework much earlier
than weston_compositor, which in turn will provide the option start
logging before weston_compositor has been created.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Harish Krupo [Thu, 9 May 2019 09:56:04 +0000 (15:26 +0530)]
gitlab-ci: Use gitlab.fdo URL for wayland-protocols
Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
Marius Vlad [Mon, 6 May 2019 17:15:06 +0000 (20:15 +0300)]
libweston: Remove functions with no implementation/definition
Seems that these functions: weston_compositor_fade()/weston_compositor_unlock()
lost their implementation a while ago.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Antonio Borneo [Fri, 26 Apr 2019 21:57:31 +0000 (23:57 +0200)]
log: remove "%m" from format strings by using strerror(errno)
The printf() format specifier "%m" is a glibc extension to print
the string returned by strerror(errno). While supported by other
libraries (e.g. uClibc and musl), it is not widely portable.
In Weston code the format string is often passed to a logging
function that calls other syscalls before the conversion of "%m"
takes place. If one of such syscall modifies the value in errno,
the conversion of "%m" will incorrectly report the error string
corresponding to the new value of errno.
Remove all the occurrences of the specifier "%m" in Weston code
by using directly the string returned by strerror(errno).
While there, fix some minor indentation issue.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
- [Thu, 2 May 2019 17:35:29 +0000 (17:35 +0000)]
zunitc: Fix undeclared identifier 'NULL'
Since v6 release, -Dtest-junit-xml=false build regressed because its
ifdef branch no longer includes stddef.h and thus NULL, either directly
or through another header. Using musl-1.1.22 and llvm-8.0.0.
Antonio Borneo [Mon, 29 Apr 2019 15:54:10 +0000 (17:54 +0200)]
clients: close unused keymap fd
In the simple examples in which keymap is not handled, the open
descriptor has to be properly closed.
After each suspend/resume sequence the keymap is send again to
every client. On client weston-simple-egl the leak causes a
segfault when no more file descriptors can be opened.
Close the file descriptor and lazily copy/paste the comment
already available in simple-dmabuf-v4l.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Simon Ser [Mon, 22 Apr 2019 17:02:19 +0000 (20:02 +0300)]
ci: run with werror
Marius Vlad [Mon, 22 Apr 2019 14:22:57 +0000 (17:22 +0300)]
weston-launch: Fix warning on error() not being avaiable due to removal of header
Commit
a1450a8a7 removed errno header but forgot to remove all error()
calls.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Randy Li [Thu, 18 Apr 2019 03:37:12 +0000 (11:37 +0800)]
make error() portable
error() is not posix but gnu extension so may not be available on all
kind of systemsi e.g. musl.
Signed-off-by: Randy 'ayaka' Li <ayaka@soulik.info>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Sebastian Wick [Tue, 9 Apr 2019 10:18:25 +0000 (12:18 +0200)]
weston-terminal: Fix weston-terminal crash on mutter
Set up handlers for wl_data_source v3 events
Signed-off-by: Sebastian Wick <sebastian@sebastianwick.net>
Harish Krupo [Fri, 19 Apr 2019 16:36:44 +0000 (22:06 +0530)]
Fix: clients/window: Premature finish request when copy-pasting
As per the wl_data_offer::finish documentation, the request is only
valid for drag n drop operations and signifies that a dnd is completed.
Send finish request only when we have a dnd operation active.
Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
Harish Krupo [Fri, 19 Apr 2019 16:36:37 +0000 (22:06 +0530)]
data-device: send INVALID_FINISH when operation != dnd
The documentation of wl_data_offer::finish states that it should be
used to signify that a drag and drop operation is completed. So send
WL_DATA_OFFER_ERROR_INVALID_FINISH when the client calls the finish
request but the operation isn't dnd.
Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
Harish Krupo [Thu, 18 Apr 2019 20:23:27 +0000 (01:53 +0530)]
window.c: Don't assume registry advertisement order
The toytoolkit assumes that wl_seats are advertised after
wl_data_device_manager and creates a data_device during wl_seat
registry binding. This patch removes this assumption by creating
data_devices for all the wl_seats created up until then.
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/201
Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
Pekka Paalanen [Thu, 4 Apr 2019 14:29:27 +0000 (17:29 +0300)]
libweston: move gl-renderer into a subdir
GL-renderer is expected to grow more files, both by addition and by splitting.
Moving them into a new subdirectory helps people to understand which files are
relevant.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 4 Apr 2019 14:19:54 +0000 (17:19 +0300)]
gl-renderer: does not need matrix.c
The symbols of matrix.c are already exported by libweston, no need to build
them again.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 4 Apr 2019 14:11:53 +0000 (17:11 +0300)]
libweston: export weston_linux_sync_file_read_timestamp()
This is an internal export for GL-renderer, so that it does not need to build
linux-sync-file.c a second time. This follows the example of
linux-explicit-synchronization.c which is also used by GL-renderer.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 4 Apr 2019 13:53:11 +0000 (16:53 +0300)]
build: turn vertex-clipping.c into a dependency
Making this into a dependency object not only carries the .c files with it, but
it also brings the include directories as well, which means the users can
simply use the object without guessing the paths.
This should help with moving GL-renderer into a new subdirectory.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 4 Apr 2019 13:02:14 +0000 (16:02 +0300)]
Move libweston-desktop.h
This too is a public installed header.
The public headers are moved under a new top-level directory include/ to make
them clearly stand out as special (public API).
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 4 Apr 2019 12:54:07 +0000 (15:54 +0300)]
xwayland: do not include weston.h
weston.h is a Weston frontend header, while this is a libweston plugin. A
libweston plugin cannot depend on Weston. Luckily the header is not actually
needed.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 4 Apr 2019 12:41:02 +0000 (15:41 +0300)]
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>
Pekka Paalanen [Thu, 4 Apr 2019 12:52:47 +0000 (15:52 +0300)]
Rename xwayland-api.h to libweston/xwayland-api.h
See "Rename compositor.h to libweston/libweston.h" for rationale.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 4 Apr 2019 11:46:00 +0000 (14:46 +0300)]
Rename zalloc.h to libweston/zalloc.h
It is a public installed header used by libweston.h.
See "Rename compositor.h to libweston/libweston.h" for rationale.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 4 Apr 2019 11:27:31 +0000 (14:27 +0300)]
Rename config-parser.h to libweston/config-parser.h
It is a public installed header used by libweston.h.
See "Rename compositor.h to libweston/libweston.h" for rationale.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 4 Apr 2019 10:47:40 +0000 (13:47 +0300)]
Rename matrix.h to libweston/matrix.h
matrix.h is a public installed header and even used by libweston.h.
See "Rename compositor.h to libweston/libweston.h" for rationale.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 29 Mar 2019 15:14:29 +0000 (17:14 +0200)]
Rename windowed-output-api.h to libweston/windowed-output-api.h
See "Rename compositor.h to libweston/libweston.h" for rationale.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 29 Mar 2019 15:07:34 +0000 (17:07 +0200)]
Rename plugin-registry.h to libweston/plugin-registry.h
See "Rename compositor.h to libweston/libweston.h" for rationale.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 29 Mar 2019 14:39:12 +0000 (16:39 +0200)]
Rename public backend headers
The backend headers are renamed from compositor-foo.h to backend-foo.h to
better describe their purpose. These headers are public libweston API for each
specific backend.
The headers will also be used like
#include <libweston/backend-drm.h>
instead of
#include <compositor-drm.h>
to give them a more explicit namespace.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 28 Mar 2019 14:28:47 +0000 (16:28 +0200)]
Rename compositor.h to libweston/libweston.h
The main idea is to make libweston users use the form
#include <libweston/libweston.h>
instead of the plain
#include <compositor.h>
which is prone to name conflicts. This is reflected both in the installed
files, and the internal header search paths so that Weston would use the exact
same form as an external project using libweston would.
The public headers are moved under a new top-level directory include/ to make
them clearly stand out as special (public API).
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 28 Mar 2019 14:35:56 +0000 (16:35 +0200)]
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>
Pekka Paalanen [Fri, 29 Mar 2019 11:35:15 +0000 (13:35 +0200)]
build: declare separate dependency for compositor.h
These are not specific to the launchers but to compositor.h, so name them that
way.
Once we can rely on the mentioned Meson PR, we can simplify this further.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 28 Mar 2019 13:49:54 +0000 (15:49 +0200)]
build: remove dir_include
It was unused.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 28 Mar 2019 12:45:40 +0000 (14:45 +0200)]
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>
Marius Vlad [Tue, 16 Apr 2019 14:37:10 +0000 (17:37 +0300)]
meson.build/libweston: Fix clang warning for export-dynamic
Identical to
8a8558dd, where we need to pass `-Wl` as linker args.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Harish Krupo [Tue, 16 Apr 2019 05:11:01 +0000 (10:41 +0530)]
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>
Luca Weiss [Sun, 14 Apr 2019 10:38:25 +0000 (10:38 +0000)]
Fix incorrect include
In file included from ../clients/multi-resource.c:38:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
#warning redirecting incorrect #include <sys/poll.h> to <poll.h>
^~~~~~~
Héctor Orón Martínez [Thu, 28 Mar 2019 15:24:42 +0000 (16:24 +0100)]
support byte-by-byte reproducible build
build path ends in the final binary package causing the
build not to be reproducible byte-by-byte.
Reference:
https://bugs.debian.org/899358
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
Kamal Pandey [Thu, 4 Apr 2019 14:15:45 +0000 (19:45 +0530)]
FIX: weston: clients: typo in simple-dmabuf-egl.c
Fix variable EGL_NO_IMAGE to EGL_NO_IMAGE_KHR in
clients/simple-dmabuf-egl.c
Signed-off-by: Kamal Pandey <pandeykamal13526@gmail.com>
Tomohito Esaki [Mon, 1 Apr 2019 08:51:35 +0000 (17:51 +0900)]
cairo-util: Don't set title string to Pango layout if the title is NULL
If buttons list isn't empty and title is NULL, SEGV is occured in
pango_layout_set_text(). This patch fixes this problem.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Pekka Paalanen [Fri, 29 Mar 2019 11:37:56 +0000 (13:37 +0200)]
build: add missing dep to x11 backend
All other backends already link to libweston, x11 backend should too.
This fixes a build failure:
[1/50] Compiling C object 'libweston/
2b98b6d@@x11-backend@sha/compositor-x11.c.o'.
FAILED: libweston/
2b98b6d@@x11-backend@sha/compositor-x11.c.o
cc -Ilibweston/
2b98b6d@@x11-backend@sha -Ilibweston -I../../git/weston/libweston -Ilibweston/.. -I../../git/weston/libweston/.. -Ilibweston/../shared -I../../git/weston/libweston/../shared -Iprotocol -I/home/pq/local/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/libdrm -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -g -Wno-unused-parameter -Wno-shift-negative-value -Wno-missing-field-initializers -fvisibility=hidden -fPIC -MD -MQ 'libweston/
2b98b6d@@x11-backend@sha/compositor-x11.c.o' -MF 'libweston/
2b98b6d@@x11-backend@sha/compositor-x11.c.o.d' -o 'libweston/
2b98b6d@@x11-backend@sha/compositor-x11.c.o' -c ../../git/weston/libweston/compositor-x11.c
../../git/weston/libweston/compositor-x11.c:51:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory
#include <xkbcommon/xkbcommon.h>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Marius Vlad [Sun, 17 Mar 2019 16:22:21 +0000 (18:22 +0200)]
compositor: Fix missing new line when displaying buffer type for EGL buffer
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Sun, 17 Mar 2019 16:10:09 +0000 (18:10 +0200)]
compositor: Fix invalid view numbering in scene-graph
With the addition of patch
433f4e77b7729 we display the same view id (0)
for every view as we're modifying the local variable.
Displaying sub-surfaces based views is also problematic. The caller need
to modify the view number as well, so we instead we pass the address as
to allow that to happen. Otherwise we end up repeating the same number
for views without sub-subrfaces once those have been printed.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Pekka Paalanen [Thu, 14 Mar 2019 15:08:30 +0000 (17:08 +0200)]
README: refer to version numbers in meson.build
configure.ac is no more, and in meson.build there are no minor or patch
versions for libweston, only major.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 14 Mar 2019 14:56:27 +0000 (16:56 +0200)]
tests: fix references to automake
There is no automake anymore, I suppose it is ninja that handles it now.
There are still a couple references to automake left to point out where the
conventions originated, e.g. the exit code 77.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 14 Mar 2019 14:43:19 +0000 (16:43 +0200)]
Clean up .gitignore after autotools removal
There is no such thing as building in-tree anymore, so no need to ignore build
artifacts.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 14 Mar 2019 14:25:14 +0000 (16:25 +0200)]
Remove autotools build
Weston 6.0.0 was released with both autotools and Meson build systems. That
should be enough for downstream to migrate to Meson build on their on pace.
Maintaining two build systems is a hassle, keep the one that is easier to work
with and let the other one go.
doc/dozygen/tool*.doxygen.in are not deleted, because they have not been
integrated with Meson yet.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 28 Mar 2019 10:26:47 +0000 (12:26 +0200)]
meson: dep fix for compositor.h needing xkbcommon.h
This fixes:
[ 5s] cc -Ilibweston/
2b98b6d@@session-helper@sta -Ilibweston -I../libweston -Ilibweston/.. -I../libweston/.. -Ilibwes
ton/../shared -I../libweston/../shared -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/dbus-1.0 -I/usr/lib6
4/dbus-1.0/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99 -Wno-unused-parameter -Wno-shift-n
egative-value -Wno-missing-field-initializers -fvisibility=hidden -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong
-funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fPIC -MD -MQ 'libweston/
2b98b6d@@session-hel
per@sta/launcher-util.c.o' -MF 'libweston/
2b98b6d@@session-helper@sta/launcher-util.c.o.d' -o 'libweston/
2b98b6d@@sessio
n-helper@sta/launcher-util.c.o' -c ../libweston/launcher-util.c
[ 5s] In file included from ../libweston/launcher-util.c:29:
[ 5s] ../libweston/compositor.h:39:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory
[ 5s] #include <xkbcommon/xkbcommon.h>
For completeness, also add the same for wayland-server.h.
Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Deepak Rawat [Tue, 24 Jul 2018 21:13:34 +0000 (14:13 -0700)]
compositor-drm: Set damage for scanout plane
Copy the damage region to scanout drm_plane_state which will be sent to
kernel during atomic state update.
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Deepak Rawat [Tue, 24 Jul 2018 21:05:37 +0000 (14:05 -0700)]
compositor-drm: Add support for drm plane FB_DAMAGE_CLIPS property
The plane property FB_DAMAGE_CLIPS provides a way to mark damaged
regions on the plane in framebuffer coordinates of the framebuffer
attached to the plane.
This patch adds a new member "damage" to compositor version of
drm_plane_state and set FB_DAMAGE_CLIPS property whenever damage is
available.
v2: Rebase, check if plane support FB_DAMAGE_CLIPS property before
setting it.
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Riku Viitanen [Thu, 28 Mar 2019 10:09:52 +0000 (10:09 +0000)]
Optimize PNGs with zopflipng
Benjamin Tissoires [Mon, 18 Mar 2019 14:51:07 +0000 (15:51 +0100)]
CI: containerize the CI
Reuse the templates from wayland/ci-templates:
whenever DEBIAN_TAG is changed, this will rebuild a new container.
This adds two things:
- better reliability (we do not randomly pull packages whenever the CI
runs and we can reproduce with this particular environment)
- faster builds, as we do not need to pull the universe at each run
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
[Pekka: bump DEBIAN_TAG]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Alexandros Frantzis [Wed, 13 Mar 2019 10:16:29 +0000 (12:16 +0200)]
clients/simple-dmabuf-egl: Properly check for error in gbm_bo_get_handle_for_plane
gbm_bo_get_handle_for_plane returns handle.s32 == -1 on error, at least
for the Mesa dri implementation.
Reported-by: Marius Vlad <marius.vlad@collabora.com>
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Pekka Paalanen [Fri, 22 Mar 2019 15:05:11 +0000 (17:05 +0200)]
meson: DRM-backend demands GBM
All the GBM code is unconditional in compositor-drm.c, so while disabling the
GL-renderer would stop GBM from being used, GBM headers would still be needed
for building and GBM library for linking.
Leave a note to fix it properly later. At least we now check for GBM and do not
mislead with the error message.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 22 Mar 2019 12:37:39 +0000 (14:37 +0200)]
meson: link remoting with glib and gobject
remoting-plugin.c calls things like g_error_free() and g_object_set(), so it
needs to link glib-2.0 and gobject-2.0 explicitly, instead of relying on
GStreamer pkg-config bringing them in.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 22 Mar 2019 12:20:51 +0000 (14:20 +0200)]
meson: link cms-colord with glib and gobject
cms-colord.c calls things like g_string_free() and g_object_unref(), so it
needs to link glib-2.0 and gobject-2.0 explicitly, instead of relying on colord
pkg-config bringing them in.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 22 Mar 2019 11:58:30 +0000 (13:58 +0200)]
meson: link editor with gobject-2.0
editor.c calls g_clear_object(), so it should link to gobject directly instead
of relying on pangocairo pulling it in in its pkg-config.
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/211
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Daniel Stone [Fri, 22 Mar 2019 12:26:19 +0000 (12:26 +0000)]
compositor: Don't ignore --use-pixman for Wayland backend
We loaded the use-pixman configuration value from both the command line
and the configuration file, but completely ignored the former. Make sure
we actually use both.
Tested with all permutations of config/command line.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Pekka Paalanen [Thu, 28 Mar 2019 08:50:11 +0000 (10:50 +0200)]
build: reopen master for regular development
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Derek Foreman [Thu, 28 Mar 2019 01:11:52 +0000 (20:11 -0500)]
configure.ac/meson.build: bump version to 6.0.0 for the official release
Marius Vlad [Wed, 27 Mar 2019 09:15:53 +0000 (11:15 +0200)]
autotools: Fix tags/cscope targets with autools
This was introduced with
a95bb6f7e554c1a7 (clients: Support explicit
synchronization)
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Derek Foreman [Thu, 21 Mar 2019 00:49:58 +0000 (19:49 -0500)]
configure.ac/meson.build: bump to version 5.0.94 for the RC2 release
Stefan Agner [Tue, 19 Mar 2019 23:09:51 +0000 (00:09 +0100)]
meson: fix building screen-share module
When building screen-share module with meson loading the module
fails with:
[00:01:28.604] Failed to load module: /usr/local/lib/weston/screen-share.so: undefined symbol: os_create_anonymous_file
Failed to process Wayland connection: Broken pipe
failed to create display: Broken pipe
The function os_create_anonymous_file is defined in libshared,
adding libshared to the dependency makes sure the function gets
compiled into screen-share.so.
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/208
Signed-off-by: Stefan Agner <stefan@agner.ch>
Derek Foreman [Thu, 14 Mar 2019 02:27:12 +0000 (21:27 -0500)]
configure.ac: bump version to 5.0.93 for the RC1 release
Philipp Zabel [Wed, 6 Mar 2019 10:12:47 +0000 (11:12 +0100)]
compositor-drm: clear gbm_surface pointer after destroying the GBM surface
Since commit
ee1d968e641e ("compositor-drm: Fall back if GBM surface fails with
modifiers"), drm_output_init_egl requires output->gbm_surface to be NULL, or
gbm_surface_create will not be called if HAVE_GBM_MODIFIERS is enabled but no
modifiers are supported by the plane. This could happen if _init_egl is called
after drm_ouptut_fini_egl drom drm_output_switch_mode.
Add an assert to guarantee the requirement and clears the gbm_surface pointer
after the surface is destroyed.
Signed-off-by: Philipp Zabel <p.pzabel@pengutronix.de>
Philipp Zabel [Tue, 5 Mar 2019 16:28:08 +0000 (17:28 +0100)]
meson: allow to build weston-simple-dmabuf-egl
It is all hooked up in clients/meson.build, just the option to enable it
was missing.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Derek Foreman [Tue, 5 Mar 2019 23:21:49 +0000 (17:21 -0600)]
configure.ac: bump to version 5.0.92 for the beta release
Alexandros Frantzis [Tue, 5 Mar 2019 10:51:14 +0000 (12:51 +0200)]
clients/simple-dmabuf-egl: Create the EGL display using the GBM platform
Since we are managing and rendering to buffers on our own with GBM,
create the EGL display using the GBM platform with the DRM render node,
instead of using the Wayland EGL platform.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Philipp Zabel [Fri, 15 Feb 2019 13:52:00 +0000 (14:52 +0100)]
compositor-drm: fix gbm_bo_get_handle_for_plane error handling
gbm_bo_get_handle_for_plane returns -1 on error, not 0.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Daniel Stone [Sat, 16 Feb 2019 16:16:10 +0000 (16:16 +0000)]
compositor-drm: Add missing newline to debug print
The 'created new mode blob' print was missing a newline, unlike all the
others.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Emmanuel Gil Peyrot [Wed, 20 Feb 2019 15:33:32 +0000 (16:33 +0100)]
Fix typos all around (thanks codespell!)
Derek Foreman [Tue, 19 Feb 2019 18:48:10 +0000 (12:48 -0600)]
configure.ac: bump to version 5.0.91 for the alpha release
Marius Vlad [Sun, 17 Feb 2019 20:14:23 +0000 (22:14 +0200)]
compositor: Fix scene-graph debug scope missing views based on sub-surfaces
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Sat, 16 Feb 2019 19:19:51 +0000 (21:19 +0200)]
compositor-drm: Print pixel format in human-friendly form when failing to assign view to a overlay plane
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Sat, 16 Feb 2019 18:43:24 +0000 (20:43 +0200)]
meson: Remove freerdp1 as it no longer builds
../libweston/compositor-rdp.c: In function ‘rdp_peer_refresh_rfx’:
../libweston/compositor-rdp.c:213:25: error: invalid type argument of unary ‘*’ (have ‘SURFACE_BITS_COMMAND’ {aka ‘struct _SURFACE_BITS_COMMAND’})
memset(&cmd, 0, sizeof(*cmd));
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
emersion [Mon, 18 Feb 2019 10:21:07 +0000 (11:21 +0100)]
Fix .editorconfig: use tabs for Meson files
Daniel Stone [Thu, 31 Jan 2019 00:02:25 +0000 (00:02 +0000)]
compositor-drm: Fall back if GBM surface fails with modifiers
If we cannot create a gbm_surface using a list of modifiers, fall back
to using the old pre-modifier version.
This fixes initialisation on systems where KMS supports modifiers but
the GBM driver does not, such as old i915 systems like Pine View using
the unified KMS driver but the old i915 Mesa driver.
Signed-off-by: Daniel Stone <daniels@collabora.com>
emersion [Fri, 15 Feb 2019 21:51:31 +0000 (22:51 +0100)]
Add .editorconfig
Sergey Bugaev [Mon, 11 Feb 2019 19:55:09 +0000 (22:55 +0300)]
desktop-shell: don't crash if a surface disappears while grabbed
A surface can get destroyed while a shell grab is active, which can
for example happen if the command running in weston-terminal exits.
When a surface gets destroyed, grab->shsurf is reset to NULL by
destroy_shell_grab_shsurf(), but otherwise the grab remains active and
its callbacks continue to be called. Thus, dereferencing grab->shsurf
in a callback without checking it for NULL first can lead to undefined
behavior, including crashes.
Several functions were already properly checking grab->shsurf for NULL,
move_grab_motion() being one example. Others, however, were not, which
is what this commit fixes.
Related to https://gitlab.freedesktop.org/wayland/weston/issues/192
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Greg V [Thu, 6 Dec 2018 22:33:34 +0000 (01:33 +0300)]
desktop-shell: remove surface destroy listener when focus state is destroyed
Changing the focused surface did remove the surface_destroy_listener from the wl_signal list,
but destroying the focus state did not. As a result, sometimes the same listener would be added
to two surfaces, which would join their wl_signal lists together, which would cause infinite
loops and use-after-frees when closing desktop surfaces.
Greg V [Wed, 7 Nov 2018 21:24:56 +0000 (00:24 +0300)]
desktop-shell: fix resize grab related crash
This crash was happening when *releasing* a pointer button on a window
that was being resized and got destroyed during the grab.
[@daniels: Cosmetic fixes; apply same fix to grab cancel.]
Greg V [Wed, 7 Nov 2018 21:27:04 +0000 (00:27 +0300)]
xwm: fix resize grab related crash
This crash was happening *during resizing* of an xwayland window that was destroyed.
Discovered by: John Good @archiesix
[@daniels: Moved tests below declarations.]
Greg V [Wed, 7 Nov 2018 21:24:15 +0000 (00:24 +0300)]
xwayland: fix clipboard related crash
Philipp Zabel [Wed, 13 Feb 2019 14:59:59 +0000 (15:59 +0100)]
meson: fix compositor build with xwayland disabled
If xwayland is disabled, compositor/weston is built without
compositor/xwayland.c, which defines wet_load_xwayland.
compositor/
fb12c4d@@weston@exe/main.c.o: In function `main':
../
weston-5.0.0-169-g2d4cc4f4dd6a/compositor/main.c:3103: undefined reference to `wet_load_xwayland'
Provide an empty stub for wet_load_xwayland if xwayland is disabled.
With that we also have to remove xwayland.c from the autotools build
if xwayland is disabled, to avoid a multiple definition error.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Philipp Zabel [Wed, 13 Feb 2019 14:10:35 +0000 (15:10 +0100)]
meson: add missing libweston EGL dependency if renderer-gl is enabled
If the 'renderer-gl' option is enabled, ENABLE_EGL is defined, and
libweston/pixel-formats.c includes EGL/egl.h. This requires an egl
dependency, as X11-less platforms need the MESA_EGL_NO_X11_HEADERS
define from egl.pc cflags:
In file included from /usr/include/EGL/egl.h:39:0,
from ../libweston/pixel-formats.c:42:
/usr/include/EGL/eglplatform.h:124:10: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Pekka Paalanen [Wed, 6 Feb 2019 12:03:21 +0000 (14:03 +0200)]
meson: IVI plugin tests do not use config
If Weston is not installed, running ivi-layout test would fail on lots of image
files not found which presumably causes the creation of some ivi surfaces to
fail, leading to an assert failure.
Looking at the test setup in weston-tests-env, these IVI plugin tests are
supposed to run with --no-config instead.
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/195
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 6 Feb 2019 11:51:55 +0000 (13:51 +0200)]
meson: set WESTON_DATA_DIR for tests
It seems WESTON_DATA_DIR was missed. If you have already installed Weston, then
the files will be found in the install location, but if not, they were not
found at all.
This caused the xwayland test to SEGV the compositor in
weston_wm_window_create_frame() when frame_crate() returned NULL.
This patch fixes the test suite only.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 8 Feb 2019 13:10:48 +0000 (15:10 +0200)]
ant8me [Wed, 28 Nov 2018 21:46:37 +0000 (22:46 +0100)]
compositor-wayland: use xdg_shell stable instead of v6
Better to excercise the current rather than outdated protocol.
Pekka:
- split the patch, rewrote commit message
- rename xdg_shell_ping to xdg_wm_base_ping
- rename xdg_shell_listener to wm_base_listener
- fix continued line alignment
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
ant8me [Wed, 28 Nov 2018 21:46:37 +0000 (22:46 +0100)]
clients: use xdg_shell stable instead of v6
Now that Weston supports the stable revision, use it. Better to excercise the
current rather than outdated protocol.
Pekka:
- split the patch, rewrote commit message
- rename xdg_shell_ping to xdg_wm_base_ping
- rename xdg_shell_listener to wm_base_listener
- rename shell to wm_base
- fix continued line alignment
- drop unrelated change of adding parentheses around bit-wise and
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
ant8me [Wed, 28 Nov 2018 21:46:37 +0000 (22:46 +0100)]
libweston-desktop: implement the new xdg_shell (stable) protocol
Some clients like the mpv video player now request the xdg_shell
protocol so these will fail if the compositor only provides the
xdg_shell_unstable_v6 protocol. Compositors like mir and gnome provide
both protocols.
The two protocols are very similar therefore the code in xdg-shell-v6.c
has been refactored to work with the new xdg_shell protocol and now
resides in xdg-shell.c.
Pekka:
- split the patch
- fix continued line alignment
Daniel
- allow anchor_rect to initially have zero dimensions
- account for get_popup allowing NULL parent surface
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Fri, 1 Feb 2019 15:05:00 +0000 (17:05 +0200)]
configure: require opt-in to autotools
Autotools is going away. Break the autotools build so that people are
guaranteed to notice before it is gone. If they have problems with Meson, they
can still use --enable-autotools to build with autotools, but we really want to
hear about any problems.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>