Commit graph

6586 commits

Author SHA1 Message Date
Harish Krupo 737ac0d4b3 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>
2019-04-19 22:06:37 +05:30
Harish Krupo ee4c7a24dd 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>
2019-04-19 16:24:26 +00:00
Pekka Paalanen 81475a5c15 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>
2019-04-18 12:52:41 +03:00
Pekka Paalanen 3a2c67aa51 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>
2019-04-18 12:50:55 +03:00
Pekka Paalanen 4b5727375c 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>
2019-04-18 12:50:55 +03:00
Pekka Paalanen 4e952328ca 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>
2019-04-18 12:50:55 +03:00
Pekka Paalanen 8ebd9817e7 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>
2019-04-18 12:31:46 +03:00
Pekka Paalanen e04159b238 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>
2019-04-18 12:31:46 +03: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 eebb7dc9ce 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>
2019-04-18 12:31:46 +03:00
Pekka Paalanen ecbdcfd373 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>
2019-04-18 12:31:46 +03:00
Pekka Paalanen 91b1010de9 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>
2019-04-18 12:31:46 +03:00
Pekka Paalanen 96dc449259 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>
2019-04-18 12:31:46 +03:00
Pekka Paalanen 9eda0ea825 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>
2019-04-18 12:31:46 +03:00
Pekka Paalanen 27b377f51f 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>
2019-04-18 12:31:46 +03:00
Pekka Paalanen 7571027f17 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>
2019-04-18 12:31:46 +03:00
Pekka Paalanen 3d5d9476e3 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>
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 cb74afd482 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>
2019-04-18 12:30:03 +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
Marius Vlad 3a28bd66ff 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>
2019-04-16 17:38:13 +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
Luca Weiss 923a1e9688 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>                                                                            
  ^~~~~~~
2019-04-14 10:38:25 +00:00
Héctor Orón Martínez 250f1066ff 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>
2019-04-09 10:08:23 +00:00
Kamal Pandey 53d7c243ba 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>
2019-04-04 19:45:45 +05:30
Tomohito Esaki 6f9db6c4a1 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>
2019-04-02 11:09:42 +09:00
Pekka Paalanen 651566af2d 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>
2019-03-29 13:40:12 +02:00
Marius Vlad 253ba9a6db compositor: Fix missing new line when displaying buffer type for EGL buffer
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2019-03-28 12:30:25 +00:00
Marius Vlad a6acfa8346 compositor: Fix invalid view numbering in scene-graph
With the addition of patch 433f4e77b7 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>
2019-03-28 12:30:25 +00:00
Pekka Paalanen 66581d245e 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>
2019-03-28 13:56:45 +02:00
Pekka Paalanen be61a1ff50 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>
2019-03-28 13:56:45 +02:00
Pekka Paalanen 5dc2ddf9c6 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>
2019-03-28 13:56:45 +02:00
Pekka Paalanen fc76388fa1 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>
2019-03-28 13:56:44 +02:00
Pekka Paalanen 779db046b9 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>
2019-03-28 12:52:00 +02:00
Deepak Rawat 46a1c729b8 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>
2019-03-28 10:19:13 +00:00
Deepak Rawat 009b3cfa6f 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>
2019-03-28 10:19:13 +00:00
Riku Viitanen 57875cd018 Optimize PNGs with zopflipng 2019-03-28 10:09:52 +00:00
Benjamin Tissoires f6d2760627 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>
2019-03-28 09:59:03 +00:00
Alexandros Frantzis ff98a9080f 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>
2019-03-28 09:51:28 +00:00
Pekka Paalanen fe6dd7bcef 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>
2019-03-28 09:47:02 +00:00
Pekka Paalanen 292aaf9308 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>
2019-03-28 09:43:23 +00:00
Pekka Paalanen 191c453f83 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>
2019-03-28 09:43:23 +00:00
Pekka Paalanen cbffca980b 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>
2019-03-28 09:43:23 +00:00
Daniel Stone 8a4585c27f 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>
2019-03-28 09:40:54 +00:00
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
Marius Vlad 825077d591 autotools: Fix tags/cscope targets with autools
This was introduced with a95bb6f7e5 (clients: Support explicit
synchronization)

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2019-03-27 11:55:39 +02: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
Stefan Agner 483c6d4d06 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>
2019-03-20 00:09:51 +01:00