platform/upstream/weston.git
5 years agoweston-terminal: Fix weston-terminal crash on mutter
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>
5 years agoFix: clients/window: Premature finish request when copy-pasting
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>
5 years agodata-device: send INVALID_FINISH when operation != dnd
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>
5 years agowindow.c: Don't assume registry advertisement order
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>
5 years agolibweston: move gl-renderer into a subdir
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>
5 years agogl-renderer: does not need matrix.c
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>
5 years agolibweston: export weston_linux_sync_file_read_timestamp()
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>
5 years agobuild: turn vertex-clipping.c into a dependency
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>
5 years agoMove libweston-desktop.h
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>
5 years agoxwayland: do not include weston.h
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>
5 years agoRename version.h to libweston/version.h
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>
5 years agoRename xwayland-api.h to libweston/xwayland-api.h
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>
5 years agoRename zalloc.h to libweston/zalloc.h
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>
5 years agoRename config-parser.h to libweston/config-parser.h
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>
5 years agoRename matrix.h to libweston/matrix.h
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>
5 years agoRename windowed-output-api.h to libweston/windowed-output-api.h
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>
5 years agoRename plugin-registry.h to libweston/plugin-registry.h
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>
5 years agoRename public backend headers
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>
5 years agoRename compositor.h to libweston/libweston.h
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>
5 years agoRename timeline-object.h to libweston/timeline-object.h
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>
5 years agobuild: declare separate dependency for compositor.h
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>
5 years agobuild: remove dir_include
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>
5 years agolibweston: fix protocol install path
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>
5 years agomeson.build/libweston: Fix clang warning for export-dynamic
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>
5 years agomeson.build: Fix warning for configure_file
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>
5 years agoFix incorrect include
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>
  ^~~~~~~

5 years agosupport byte-by-byte reproducible build
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>
5 years agoFIX: weston: clients: typo in simple-dmabuf-egl.c
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>
5 years agocairo-util: Don't set title string to Pango layout if the title is NULL
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>
5 years agobuild: add missing dep to x11 backend
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>
5 years agocompositor: Fix missing new line when displaying buffer type for EGL buffer
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>
5 years agocompositor: Fix invalid view numbering in scene-graph
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>
5 years agoREADME: refer to version numbers in meson.build
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>
5 years agotests: fix references to automake
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>
5 years agoClean up .gitignore after autotools removal
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>
5 years agoRemove autotools build
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>
5 years agomeson: dep fix for compositor.h needing xkbcommon.h
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>
5 years agocompositor-drm: Set damage for scanout plane
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>
5 years agocompositor-drm: Add support for drm plane FB_DAMAGE_CLIPS property
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>
5 years agoOptimize PNGs with zopflipng
Riku Viitanen [Thu, 28 Mar 2019 10:09:52 +0000 (10:09 +0000)]
Optimize PNGs with zopflipng

5 years agoCI: containerize the CI
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>
5 years agoclients/simple-dmabuf-egl: Properly check for error in gbm_bo_get_handle_for_plane
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>
5 years agomeson: DRM-backend demands GBM
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>
5 years agomeson: link remoting with glib and gobject
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>
5 years agomeson: link cms-colord with glib and gobject
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>
5 years agomeson: link editor with gobject-2.0
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>
5 years agocompositor: Don't ignore --use-pixman for Wayland backend
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>
5 years agobuild: reopen master for regular development
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>
5 years agoconfigure.ac/meson.build: bump version to 6.0.0 for the official release
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

5 years agoautotools: Fix tags/cscope targets with autools
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>
5 years agoconfigure.ac/meson.build: bump to version 5.0.94 for the RC2 release
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

5 years agomeson: fix building screen-share module
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>
5 years agoconfigure.ac: bump version to 5.0.93 for the RC1 release
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

5 years agocompositor-drm: clear gbm_surface pointer after destroying the GBM surface
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>
5 years agomeson: allow to build weston-simple-dmabuf-egl
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>
5 years agoconfigure.ac: bump to version 5.0.92 for the beta release
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

5 years agoclients/simple-dmabuf-egl: Create the EGL display using the GBM platform
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>
6 years agocompositor-drm: fix gbm_bo_get_handle_for_plane error handling
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>
6 years agocompositor-drm: Add missing newline to debug print
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>
6 years agoFix typos all around (thanks codespell!)
Emmanuel Gil Peyrot [Wed, 20 Feb 2019 15:33:32 +0000 (16:33 +0100)]
Fix typos all around (thanks codespell!)

6 years agoconfigure.ac: bump to version 5.0.91 for the alpha release
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

6 years agocompositor: Fix scene-graph debug scope missing views based on sub-surfaces
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>
6 years agocompositor-drm: Print pixel format in human-friendly form when failing to assign...
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>
6 years agomeson: Remove freerdp1 as it no longer builds
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>
6 years agoFix .editorconfig: use tabs for Meson files
emersion [Mon, 18 Feb 2019 10:21:07 +0000 (11:21 +0100)]
Fix .editorconfig: use tabs for Meson files

6 years agocompositor-drm: Fall back if GBM surface fails with modifiers
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>
6 years agoAdd .editorconfig
emersion [Fri, 15 Feb 2019 21:51:31 +0000 (22:51 +0100)]
Add .editorconfig

6 years agodesktop-shell: don't crash if a surface disappears while grabbed
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>
6 years agodesktop-shell: remove surface destroy listener when focus state is destroyed
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.

6 years agodesktop-shell: fix resize grab related crash
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.]

6 years agoxwm: fix resize grab related crash
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.]

6 years agoxwayland: fix clipboard related crash
Greg V [Wed, 7 Nov 2018 21:24:15 +0000 (00:24 +0300)]
xwayland: fix clipboard related crash

6 years agomeson: fix compositor build with xwayland disabled
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>
6 years agomeson: add missing libweston EGL dependency if renderer-gl is enabled
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>
6 years agomeson: IVI plugin tests do not use config
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>
6 years agomeson: set WESTON_DATA_DIR for tests
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>
6 years agolibweston: bump major to 6
Pekka Paalanen [Fri, 8 Feb 2019 13:10:48 +0000 (15:10 +0200)]
libweston: bump major to 6

At least the following commits break the libweston ABI, strictly speaking:
a5630eafec4f139adf1da4a5ba54894715d7b50f
ce62cb3d05505777893ccdfacbf2a013c82e4ce2
195dadeb2add729735c32b9e394d7d1397cf065c
c18ffd3939499897fb3eefc6ff3627140d88a23d
ea54c2fda65aacd87c6385461dc7e7f7fb0d425d
27d7c395c7600e9bf6b13dd8b3d06ee19aab1aba
acff29b3b3c3ab804db54fcc8524df53b6b9e1fb
676296749a5ddb82d2f378829f419398602e5ce4
c9c247730b37a0101570f7a2596b1fb8b6ac66b5
65e1be1234fcbb7455fc9b41ac9916d258cf39f8

Furhtermore, 64fbd0f41f4eb175b772a2eddba8bfccb66e016a break the weston
executable exported ABI.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
6 years agocompositor-wayland: use xdg_shell stable instead of v6
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>
6 years agoclients: use xdg_shell stable instead of v6
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>
6 years agolibweston-desktop: implement the new xdg_shell (stable) protocol
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>
6 years agoconfigure: require opt-in to autotools
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>
6 years agoREADME: Meson for build
Pekka Paalanen [Fri, 1 Feb 2019 15:01:14 +0000 (17:01 +0200)]
README: Meson for build

Explain how to use with Meson, as autotools is going away.

The instructions have been copied from
https://wayland.freedesktop.org/building.html .

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
6 years agoconfig-parser: export functions to open a config file
Michael Olbrich [Mon, 8 Oct 2018 14:04:44 +0000 (16:04 +0200)]
config-parser: export functions to open a config file

The in-tree clients can access the functions via libshared, but they are
currently not available for external clients, such as custom shell helper
applications similar to weston-desktop-shell or
weston-ivi-shell-user-interface.
The functions to read the content of the config are already exported.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
6 years agowindow client: remove ivi-application support
Michael Teyfel [Wed, 11 Oct 2017 15:17:29 +0000 (17:17 +0200)]
window client: remove ivi-application support

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agosimple-shm: remove ivi-application support
Michael Teyfel [Wed, 11 Oct 2017 15:09:57 +0000 (17:09 +0200)]
simple-shm: remove ivi-application support

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agosimple-egl: remove ivi-application support
Michael Teyfel [Tue, 17 Oct 2017 09:13:02 +0000 (11:13 +0200)]
simple-egl: remove ivi-application support

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agohmi-controller: register for desktop_surface_configured
Michael Teyfel [Mon, 9 Apr 2018 12:14:50 +0000 (14:14 +0200)]
hmi-controller: register for desktop_surface_configured

Since ivi-shell now supports xdg-protocol, the surface_created listener
can be removed and the desktop_surface_configured listener is needed.
ivi-layout: libweston-desktop api is used to send configure event to
application.

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agoivi-shell: create weston_desktop in wet_shell_init
Michael Teyfel [Tue, 17 Oct 2017 09:10:58 +0000 (11:10 +0200)]
ivi-shell: create weston_desktop in wet_shell_init

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agoivi-shell: remove surface_destroy_listener
Michael Teyfel [Tue, 17 Oct 2017 09:10:18 +0000 (11:10 +0200)]
ivi-shell: remove surface_destroy_listener

Since the surface_destroy_listener is only registered for ivi-shell
applications, it should only be removed for ivi-shell applications.

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agoivi-shell: added libweston-desktop-api implementation
Michael Teyfel [Tue, 5 Feb 2019 14:25:56 +0000 (15:25 +0100)]
ivi-shell: added libweston-desktop-api implementation

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agoivi-layout: use libweston-desktop api for configure event
Michael Teyfel [Wed, 6 Feb 2019 15:10:09 +0000 (16:10 +0100)]
ivi-layout: use libweston-desktop api for configure event

The libweston-desktop api is used to send configure
event to application.

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agoivi-layout: use libweston-desktop api for views
Michael Teyfel [Mon, 6 Nov 2017 11:55:07 +0000 (12:55 +0100)]
ivi-layout: use libweston-desktop api for views

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agoivi-shell: linked libweston-desktop and added structs
Michael Teyfel [Fri, 1 Feb 2019 14:17:35 +0000 (15:17 +0100)]
ivi-shell: linked libweston-desktop and added structs

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agoivi-layout: introduced surface create and configure
Michael Teyfel [Tue, 5 Feb 2019 14:15:22 +0000 (15:15 +0100)]
ivi-layout: introduced surface create and configure

Introduced surface create and configure function for xdg-apps.

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agoivi-layout: introduced configure_desktop_changed
Michael Teyfel [Tue, 17 Oct 2017 09:03:38 +0000 (11:03 +0200)]
ivi-layout: introduced configure_desktop_changed

Introduced signal configure_desktop_changed with interface. This signal
should be sent, when a desktop-surface is configured.

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agolayout-interface: added interface to change surface id
Michael Teyfel [Tue, 17 Oct 2017 08:35:47 +0000 (10:35 +0200)]
layout-interface: added interface to change surface id

This interface enables an id-agent to change the surface ids of an
ivi-layout-surface once.

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agoivi-shell: introduction of IVI_INVALID_ID
Michael Teyfel [Tue, 17 Oct 2017 08:31:09 +0000 (10:31 +0200)]
ivi-shell: introduction of IVI_INVALID_ID

Introduction of IVI_INVALID_ID for xdg-shell applications.

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agoivi-shell: removed assert
Michael Teyfel [Tue, 17 Oct 2017 08:29:21 +0000 (10:29 +0200)]
ivi-shell: removed assert

Removed assert, that checks if ivi-surface is not available, since this
can now happen with xdg-shell support.

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agoivi-shell: rework goto labels to avoid memory leaks
Michael Teyfel [Tue, 26 Sep 2017 15:12:08 +0000 (17:12 +0200)]
ivi-shell: rework goto labels to avoid memory leaks

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
6 years agolibweston: export weston_config API
Pekka Paalanen [Wed, 6 Feb 2019 14:42:09 +0000 (16:42 +0200)]
libweston: export weston_config API

Make it official that libweston will export the weston_config API, as requested
in https://gitlab.freedesktop.org/wayland/weston/merge_requests/29 .

There is no other way third party helper clients could access the API.

The autotools build has been accidentally exporting it all the time, but the
Meson build needed fixing.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>