summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* build: bump to version 6.0.1 for the point release6.0.16.0Simon Ser2019-06-242-3/+3
|
* compositor: Don't ignore --use-pixman for Wayland backendDaniel Stone2019-06-191-1/+1
| | | | | | | | | | | | | 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> (cherry picked from commit 8a4585c27f5fa88511dbfafe4ae7403df3f83edc)
* weston: Properly test for output-creation failureDaniel Stone2019-06-191-1/+1
| | | | | | | | | We were testing the wrong variable to see if output creation had failed: instead of testing the return of the function we'd just called, we were testing something we'd already checked earlier. Signed-off-by: Daniel Stone <daniels@collabora.com> (cherry picked from commit 814335821eb0fb5e74ec031c0cf68399e1dd370a)
* compositor: Fix incorrect use of bool optionsScott Anderson2019-06-191-3/+9
| | | | | | | | | | WESTON_OPTION_BOOLEAN takes a pointer to an int as an argument, but there were several cases of being passed a pointer to a bool instead. This changes it to use a local int instead, and then write that value to the bool. Signed-off-by: Scott Anderson <scott.anderson@collabora.com> (cherry picked from commit 2edbcbd9cdd30e00556e9618570234ea68d89b11)
* log: remove "%m" from format strings by using strerror(errno)Antonio Borneo2019-06-1949-149/+265
| | | | | | | | | | | | | | | | | | | 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> (cherry picked from commit 3957863667c15bc5f1984ddc6c5967a323f41e7a)
* Fix build with kernel < 4.4Fabrice Fontaine2019-06-191-1/+1
| | | | | | | | | | | | | | | | | weston includes input-event-codes.h since version 5.0.91 and https://github.com/wayland-project/weston/commit/6e229ca26381bc8191fd9af1e439c311da709aff input-event-codes.h is available only since kernel 4.4 and https://github.com/torvalds/linux/commit/f902dd893427eade90f7eaf858e5ff8b150a5a12 To fix this build failure, replace include on linux/input-event-codes.h by linux/input.h Fixes: - http://autobuild.buildroot.org/results/210c2759900f15ea0030d088f6f45cd8bb199b29 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> (cherry picked from commit 137b811ecd566086f7eb42c1e49e7c0cf27fb85e)
* compositor: fix segfaults if wl_display_create failsSilva Alejandro Ismael2019-06-191-0/+5
| | | | | | | | | Added check to log the error if wl_display_create return NULL. Fixes: #101 Signed-off-by: Silva Alejandro Ismael <silva.alejandro.ismael@gmail.com> (cherry picked from commit 21a1f40760f2da174fa52399fa0d9a8c1f772e68)
* zunitc: Fix undeclared identifier 'NULL'-2019-06-191-0/+1
| | | | | | | | 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. (cherry picked from commit 45d38856c8856b5550bb5656bda60ea674ca52c0)
* clients: close unused keymap fdAntonio Borneo2019-06-193-0/+7
| | | | | | | | | | | | | | | 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> (cherry picked from commit 4071225cdc12a36a08ddd3102a3dd17d4006c320)
* weston-terminal: Fix weston-terminal crash on mutterSebastian Wick2019-06-191-1/+20
| | | | | | | Set up handlers for wl_data_source v3 events Signed-off-by: Sebastian Wick <sebastian@sebastianwick.net> (cherry picked from commit 1bdf36329557e6c846d5e51856eb8da00504212a)
* Fix: clients/window: Premature finish request when copy-pastingHarish Krupo2019-06-191-2/+3
| | | | | | | | | 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> (cherry picked from commit 43152a3a8fa1e3164db33ac7ace105186c5e8ac8)
* data-device: send INVALID_FINISH when operation != dndHarish Krupo2019-06-192-0/+10
| | | | | | | | | | 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> (cherry picked from commit 737ac0d4b3f7b40c345b61ff62dea0550217f063)
* window.c: Don't assume registry advertisement orderHarish Krupo2019-06-191-5/+24
| | | | | | | | | | | | 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> (cherry picked from commit ee4c7a24dd8e2f52edc3ee4a9245f316e8261367)
* Fix incorrect includeLuca Weiss2019-06-191-1/+1
| | | | | | | | | 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> ^~~~~~~ (cherry picked from commit 923a1e9688c7f9a16cb5195e1bc22deff3f43e39)
* FIX: weston: clients: typo in simple-dmabuf-egl.cKamal Pandey2019-06-191-1/+1
| | | | | | | | Fix variable EGL_NO_IMAGE to EGL_NO_IMAGE_KHR in clients/simple-dmabuf-egl.c Signed-off-by: Kamal Pandey <pandeykamal13526@gmail.com> (cherry picked from commit 53d7c243ba0baa052081735b8effff4e2679ce65)
* cairo-util: Don't set title string to Pango layout if the title is NULLTomohito Esaki2019-06-191-4/+6
| | | | | | | | 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> (cherry picked from commit 6f9db6c4a16d853bbc5889ad5ff0d9c75e21d69c)
* compositor: Fix missing new line when displaying buffer type for EGL bufferMarius Vlad2019-06-191-1/+1
| | | | | Signed-off-by: Marius Vlad <marius.vlad@collabora.com> (cherry picked from commit 253ba9a6db38aaf92955d32aac044d4d7d3a076a)
* compositor: Fix invalid view numbering in scene-graphMarius Vlad2019-06-191-4/+8
| | | | | | | | | | | | | 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> (cherry picked from commit a6acfa83460d4f1e9f59fd5e52a8e39e1b8d4167)
* clients/simple-dmabuf-egl: Properly check for error in ↵Alexandros Frantzis2019-06-191-3/+11
| | | | | | | | | | | 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> (cherry picked from commit ff98a9080fcc1e8689bb5996dd03fc4f1c313983)
* libweston: fix protocol install pathPekka Paalanen2019-06-181-1/+1
| | | | | | | | 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> (cherry picked from commit 4ab901ebb0cc18aab8af34263e91c352b6a4e29f)
* meson.build/libweston: Fix clang warning for export-dynamicMarius Vlad2019-06-181-1/+1
| | | | | | | Identical to 8a8558dd, where we need to pass `-Wl` as linker args. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> (cherry picked from commit 3a28bd66ff35c75e174bde1fe9dce0791f90a087)
* meson.build: Fix warning for configure_fileHarish Krupo2019-06-183-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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> (cherry picked from commit b81fc517d87eecf2df6ec80c0a317656d611f9b3)
* build: add missing dep to x11 backendPekka Paalanen2019-06-181-0/+1
| | | | | | | | | | | | | | | 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> (cherry picked from commit 651566af2d937a8889ddda0ecc71e93b4091842a)
* meson: dep fix for compositor.h needing xkbcommon.hPekka Paalanen2019-06-181-1/+5
| | | | | | | | | | | | | | | | | | | | | 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> (cherry picked from commit 779db046b91f28458b6bd79e07818ae20b49ba8b)
* meson: DRM-backend demands GBMPekka Paalanen2019-06-181-2/+3
| | | | | | | | | | | | 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> (cherry picked from commit fe6dd7bcefa6a073f28bae778059a915328e3849)
* meson: link remoting with glib and gobjectPekka Paalanen2019-06-181-1/+2
| | | | | | | | | 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> (cherry picked from commit 292aaf930832f152efabf0e6314d17dbbe70271d)
* meson: link cms-colord with glib and gobjectPekka Paalanen2019-06-181-1/+11
| | | | | | | | | 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> (cherry picked from commit 191c453f831d3c955cec9beb8d9f1fc8fafc0e59)
* meson: link editor with gobject-2.0Pekka Paalanen2019-06-181-1/+1
| | | | | | | | | | 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> (cherry picked from commit cbffca980b19fd6a6de14d9f2b4dca6a7711d9e0)
* configure.ac/meson.build: bump version to 6.0.0 for the official release6.0.0Derek Foreman2019-03-272-3/+3
|
* autotools: Fix tags/cscope targets with autoolsMarius Vlad2019-03-271-1/+1
| | | | | | | This was introduced with a95bb6f7e554c1a7 (clients: Support explicit synchronization) Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
* configure.ac/meson.build: bump to version 5.0.94 for the RC2 release5.0.94Derek Foreman2019-03-202-2/+2
|
* meson: fix building screen-share moduleStefan Agner2019-03-201-0/+1
| | | | | | | | | | | | | | | | 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>
* configure.ac: bump version to 5.0.93 for the RC1 release5.0.93Derek Foreman2019-03-131-1/+1
|
* compositor-drm: clear gbm_surface pointer after destroying the GBM surfacePhilipp Zabel2019-03-061-0/+4
| | | | | | | | | | | | | 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>
* meson: allow to build weston-simple-dmabuf-eglPhilipp Zabel2019-03-061-1/+1
| | | | | | | 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>
* configure.ac: bump to version 5.0.92 for the beta release5.0.92Derek Foreman2019-03-051-1/+1
|
* clients/simple-dmabuf-egl: Create the EGL display using the GBM platformAlexandros Frantzis2019-03-051-5/+7
| | | | | | | | 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>
* compositor-drm: fix gbm_bo_get_handle_for_plane error handlingPhilipp Zabel2019-02-251-2/+5
| | | | | | gbm_bo_get_handle_for_plane returns -1 on error, not 0. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* compositor-drm: Add missing newline to debug printDaniel Stone2019-02-221-1/+1
| | | | | | | The 'created new mode blob' print was missing a newline, unlike all the others. Signed-off-by: Daniel Stone <daniels@collabora.com>
* Fix typos all around (thanks codespell!)Emmanuel Gil Peyrot2019-02-2019-26/+26
|
* configure.ac: bump to version 5.0.91 for the alpha release5.0.91Derek Foreman2019-02-191-1/+1
|
* compositor: Fix scene-graph debug scope missing views based on sub-surfacesMarius Vlad2019-02-181-1/+28
| | | | Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
* compositor-drm: Print pixel format in human-friendly form when failing to ↵Marius Vlad2019-02-181-2/+3
| | | | | | assign view to a overlay plane Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
* meson: Remove freerdp1 as it no longer buildsMarius Vlad2019-02-181-4/+1
| | | | | | | | ../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>
* Fix .editorconfig: use tabs for Meson filesemersion2019-02-181-1/+1
|
* compositor-drm: Fall back if GBM surface fails with modifiersDaniel Stone2019-02-161-1/+6
| | | | | | | | | | | 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>
* Add .editorconfigemersion2019-02-161-0/+15
|
* desktop-shell: don't crash if a surface disappears while grabbedSergey Bugaev2019-02-161-2/+3
| | | | | | | | | | | | | | | | | | | 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>
* desktop-shell: remove surface destroy listener when focus state is destroyedGreg V2019-02-161-0/+4
| | | | | | | 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.
* desktop-shell: fix resize grab related crashGreg V2019-02-161-6/+13
| | | | | | | 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.]