Commit Graph

6561 Commits

Author SHA1 Message Date
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
Derek Foreman 6f897960cb configure.ac: bump version to 5.0.93 for the RC1 release 2019-03-13 21:27:12 -05:00
Philipp Zabel 5c8eef147c compositor-drm: clear gbm_surface pointer after destroying the GBM surface
Since commit ee1d968e64 ("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>
2019-03-06 11:26:42 +01:00
Philipp Zabel 2293cb4238 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>
2019-03-06 00:34:42 +01:00
Derek Foreman 7825f141ad configure.ac: bump to version 5.0.92 for the beta release 2019-03-05 17:21:49 -06:00
Alexandros Frantzis 10a7339611 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>
2019-03-05 13:04:39 +02:00
Philipp Zabel 1c49b5445e 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>
2019-02-25 17:19:54 +01:00
Daniel Stone 2914a6da8b 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>
2019-02-22 13:43:22 +00:00
Emmanuel Gil Peyrot 426c24673f Fix typos all around (thanks codespell!) 2019-02-20 16:47:35 +01:00
Derek Foreman e578004b3c configure.ac: bump to version 5.0.91 for the alpha release 2019-02-19 12:48:10 -06:00
Marius Vlad 433f4e77b7 compositor: Fix scene-graph debug scope missing views based on sub-surfaces
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2019-02-18 16:48:37 +02:00
Marius Vlad d4c7bc58ab 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>
2019-02-18 16:19:58 +02:00
Marius Vlad 0a9c953825 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>
2019-02-18 10:46:10 +00:00
emersion 438de4f559
Fix .editorconfig: use tabs for Meson files 2019-02-18 11:21:07 +01:00
Daniel Stone ee1d968e64 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>
2019-02-16 11:05:40 +00:00
emersion 521056b37b
Add .editorconfig 2019-02-16 11:09:21 +01:00
Sergey Bugaev 14ef201295 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>
2019-02-16 09:45:52 +00:00
Greg V 15d3d3004b 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.
2019-02-16 09:45:52 +00:00
Greg V ec3f779aa7 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.]
2019-02-16 09:45:36 +00:00
Greg V dce10bd141 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.]
2019-02-16 09:38:34 +00:00
Greg V 4253f23576 xwayland: fix clipboard related crash 2019-02-16 09:37:30 +00:00
Philipp Zabel b68847a8bc 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>
2019-02-15 23:26:16 +01:00
Philipp Zabel cca7346557 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>
2019-02-15 23:26:16 +01:00
Pekka Paalanen c58648b0df 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>
2019-02-15 19:21:26 +00:00
Pekka Paalanen fcd9f67467 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>
2019-02-15 19:21:26 +00:00
Pekka Paalanen cd6bf210a4 libweston: bump major to 6
At least the following commits break the libweston ABI, strictly speaking:
- a5630eafec
- ce62cb3d05
- 195dadeb2a
- c18ffd3939
- ea54c2fda6
- 27d7c395c7
- acff29b3b3
- 676296749a
- c9c247730b
- 65e1be1234

Furhtermore, 64fbd0f41f break the weston
executable exported ABI.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-02-15 18:33:25 +00:00