- Jul 09, 2018
-
-
Daniel Stone authored
Collect the fallback definitions of static_assert() from desktop-shell and the test shell, and move them to helpers.h. This allows code throughout the tree to use static_assert() for build-time assertions, where it is supported by the compiler. As GCC goes out of its way to only add static_assert() when C11 has been explicitly requested - which we don't do - make sure to use the more widely available _Static_assert() if that is provided. This will be used in future patches to ensure two array lengths don't go out of sync. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Jun 20, 2018
-
-
Pekka Paalanen authored
Now that WESTON_MODULE_MAP supersedes WESTON_BUILD_DIR for libexec binaries, we don't need to check in WESTON_BUILD_DIR anymore. There was only one user of weston_config_get_libexec_dir(), so remove the whole function. There is no reason to export it. Due to libshared.la being pulled into libweston, this probably was libweston ABI unintended. Regardless, libweston major has already been bumped. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Emre Ucan <eucan@de.adit-jv.com> Reviewed-by:
Emil Velikov <emil.velikov@collabora.com>
-
- Feb 20, 2018
-
-
Add a helper function to check if two struct timespec values are equal. This helper function will be used in upcoming commits that implement the input_timestamps_unstable_v1 protocol. Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Feb 09, 2018
-
-
The cairo surface used for the icon must be completely given to the frame as soon as said frame has been created. To prevent both the window and the frame from sharing ownership of the icon, we set window->icon_surface back to NULL right after creating or changing the frame, only keeping it there when no frame has been created yet. Fixes https://lists.freedesktop.org/archives/wayland-devel/2018-January/036655.html Reported-by:
Derek Foreman <derekf@osg.samsung.com> Tested-by:
Derek Foreman <derekf@osg.samsung.com> Signed-off-by:
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
-
Instead of assuming the file prefix contains the path and filename prefix, give these two items separately. A NULL or empty string path may still be given to refer to the current directory. Signed-off-by:
Aleksander Morgado <aleksander@aleksander.es> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
- Feb 07, 2018
-
-
Replace every use of DATADIR to create a filename with a call to the new function that allows overriding DATADIR with an env var at runtime. No attention is paid to asprintf failure. This restores make distcheck to a passing state after commit 6b58ea began checking cairo surfaces for validity and exchanged undefined behaviour we shouldn't have been dependent on for consistent test failure. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Acked-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net> [Pekka: split if-branches into two lines] Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Currently we look for png files in their install directory, and we manufacture filenames with string pasting at compile time. This new function will allow overriding the compile time setting with the env var WESTON_DATA_DIR so we can do neat tricks like allow our test suite to pass when we haven't yet installed icons system-wide. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Acked-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net> [Pekka: split if-branch into two lines.] Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Jan 18, 2018
-
-
This fetches the _NET_WM_ICON property of the X11 window, and use the first image found as the frame icon. This has been tested with various X11 programs, and improves usability and user-friendliness a bit. Changes since v1: - Changed frame_button_create() to use frame_button_create_from_surface() internally. - Removed a check that should never have been commited. Changes since v2: - Request UINT32_MAX items instead of 2048, to avoid cutting valid icons. - Strengthen checks against malformed input. - Handle XCB_PROPERTY_DELETE to remove the icon. - Schedule a repaint if the icon changed. Changes since v3: - Keep the previous Cairo surface until the new one has been successfully loaded. - Use uint32_t for cardinals. Unsigned is the same type except on 16-bit machines, but uint32_t is clearer. - Declare length as uint32_t too, like in xcb_get_property_reply_t. Signed-off-by:
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
- Dec 18, 2017
-
-
Add helper function to convert from struct timespec values to tv_sec_hi, tv_sec_lo, tv_nsec triplets used for sending high-resolution timestamp data over the wayland protocol. Replace existing conversion code with the helper function. Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Add helper function to convert tv_sec_hi, tv_sec_lo, tv_nsec triplets, used for sending high-resolution timestamp data over the wayland protocol, to struct timespec values. Replace existing conversion code with the helper function. Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Dec 05, 2017
-
-
If Weston is built with Pango, use it to render the title for X11 applications and Weston toy toolkit clients. It allows us to ellipsize the title when there isn't enough space to show the whole string. Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
The title in X11 windows and Wayland application using Weston toy toolkit were placing the title in a very naive fashion. It was only try to center the string in the title bar. This patch: * Makes sure the title isn't renderer underneath buttons; * Move the title to the left if the titlebar isn't large enough; * Clip the end of the title if needed. Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
- Dec 04, 2017
-
-
These are already used as bools by all callers, let's make that official. Signed-off-by:
Eric Engestrom <eric@engestrom.ch> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
This field is populated with chars, compared to chars and printed as a char. It should probably be a char. Signed-off-by:
Eric Engestrom <eric@engestrom.ch> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
- Nov 27, 2017
-
-
Add helper functions to make it easy and less error-prone to convert between values in various time units (nsec, usec, msec) and struct timespec. These helpers are going to be used in the upcoming commits to transition the Weston codebase to struct timespec. Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Add a helper function to check if a struct timespec is zero. This helper will be used in the upcoming commits to transition the Weston codebase to struct timespec. Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Oct 02, 2017
-
-
On the musl C library, tests/timespec-text.c does not build, with the following error: In file included from tests/timespec-test.c:36:0: ./shared/timespec-util.h:41:21: warning: ‘struct timespec’ declared inside parameter list will not be visible outside of this definition or declaration timespec_sub(struct timespec *r, ^~~~~~~~ [...] Indeed, struct timespec is defined in time.h, so we must include it. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Sep 29, 2017
-
-
Use EGL fence sync objects to emit timepoints for the beginning and the end of rendering on the GPU. The timepoints are emitted asynchronously using the sync file fds associated with the fence sync objects. The sync file fds are acquired using the facilities provided by the EGL_ANDROID_native_fence_sync extension. The asynchronous timepoint submissions are stored in a list in gl_output_state until they are executed, and any pending submissions that remain at output destruction time are cleaned up. If timelining is inactive or the required EGL extensions are not present, then GPU timepoint processing and emission are skipped. Note that the GPU timestamps returned by sync files are in the CLOCK_MONOTONIC clock domain, and are thus compatible with the timeline timestamps (which also are in the CLOCK_MONOTONIC domain). Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Check for the EGL_KHR_fence_sync and EGL_ANDROID_native_fence_sync extensions and get pointers to required extension functions. These extensions allow us to acquire GPU timestamp information asynchronously, and are required by the upcoming work to add rendering begin/end timepoints to the weston timeline. Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Jun 12, 2017
-
-
EGL_EXT_image_dma_buf_import_modifiers supports importing upto four dmabuf planes into an EGLImage. v2: correct PLANE3_PITCH token (Daniel Stone) Signed-off-by:
Varad Gautam <varad.gautam@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
pass over the modifier attributes to EGL. v2: ensure same modifier is passed for all planes (Daniel Stone) Signed-off-by:
Varad Gautam <varad.gautam@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
EGL_EXT_image_dma_buf_import_modifiers allows querying the formats and modifiers supported by the platform. expose these to the compositor. v2: - change calloc args (Daniel Stone) - check for modifier support before querying formats (Daniel Stone) Signed-off-by:
Varad Gautam <varad.gautam@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
- May 23, 2017
-
-
A little earlier today I ended up spending a lot of time trying to figure out why weston wasn't managing to launch over SSH and telling me that I did not have a --tty option specified, despite me passing the option strings ["--tty", "3"]. Turns out weston just doesn't support that. So, add support for this kind of format in addition to "--foo=bar" to save others from making the same mistake I did. Changes since v1: - Add comment about unreachable boolean check in long_option_with_arg() - Convert boolean check in long_option_with_arg() to assert Signed-off-by:
Lyude <lyude@redhat.com> Reviewed-by:
Eric Engestrom <eric@engestrom.ch> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
- Mar 24, 2017
-
-
The man page indicates that ftruncate() can set errno to EINTR, so test for this. I have not actually been able to provoke an EINTR error from ftruncate() in testing though. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
posix_fallocate() can return EINTR and need to be restarted - I've hit this when running weston-terminal under gdb. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
- Mar 13, 2017
-
-
Add helpers to subtract two timespecs, then return the difference in either milliseconds or nanoseconds. These will be used to compare timestamps during the repaint cycle. Signed-off-by:
Daniel Stone <daniels@collabora.com> Suggested-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Paralleling timespec_to_nsec, converts to milliseconds. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> [Pekka: added doc about flooring] Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Mar 08, 2017
-
-
Add a (timespec) = (timespec) + (msec) helper, to save intermediate conversions in its users. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Add a (timespec) = (timespec) + (nsec) helper, to save intermediate conversions to nanoseconds in its users. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Feb 21, 2017
-
-
Emmanuel Gil Peyrot authored
This symbol wasn’t exported from the weston binary, most likely due to an oversight in 6e2c1249, and because internal modules can link against libshared.la directly it hasn’t been found ever since. This commit makes it possible for external modules to iterate over the configuration file. Signed-off-by:
Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by:
Bryce Harrington <bryce@osg.samsung.com>
-
- Jan 30, 2017
-
-
Daniel Stone authored
Given that it's used by clients, it's really the very definition of shared. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
- Jan 03, 2017
-
-
Signed-off-by:
Abdur Rehman <arehmanq199@gmail.com> Reviewed-by:
Yong Bakos <ybakos@humanoriented.com>
-
Signed-off-by:
Abdur Rehman <arehmanq199@gmail.com> Reviewed-by:
Yong Bakos <ybakos@humanoriented.com>
-
- Nov 21, 2016
-
-
Introduce the weston_platform_destroy_egl_surface() wrapper to complement the weston_platform_create_egl_surface() one. We'll use the former with the next patches trhoughout weston to consistently destroy the surface as needed. Signed-off-by:
Emil Velikov <emil.velikov@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
- Sep 26, 2016
-
-
Including `weston-egl-ext.h` causes compilation failure for configurations with EGL disabled. Verified with `--disable-egl`, `--disable-x11-compositor` and `--disable-drm-compositor`. Signed-off-by:
Krzysztof Konopko <kris@youview.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Sep 24, 2016
-
-
On musl, int32_t is defined in stdint.h. Signed-off-by:
Kylie McClain <kylie@somasis.com> Reviewed-by:
Yong Bakos <ybakos@humanoriented.com>
-
Morgane Glidic authored
This silences two warnings: clients/window.c:2450:20: warning: implicit conversion from enumeration type 'enum wl_pointer_button_state' to different enumeration type 'enum frame_button_state' [-Wenum-conversion] button, state); ^~~~~ clients/window.c:2453:15: warning: implicit conversion from enumeration type 'enum wl_pointer_button_state' to different enumeration type 'enum frame_button_state' [-Wenum-conversion] button, state); ^~~~~ Warning produced by Clang 3.8. Signed-off-by:
Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by:
Giulio Camuffo <giuliocamuffo@gmail.com>
-
- Aug 27, 2016
-
-
Signed-off-by:
Bryce Harrington <bryce@osg.samsung.com> Reviewed-by:
Yong Bakos <ybakos@humanoriented.com>
-
- Aug 15, 2016
-
-
Morgane Glidic authored
shared/image-loader.c: In function 'load_image': shared/image-loader.c:434:12: warning: 'image' may be used uninitialized in this function [-Wmaybe-uninitialized] } else if (!image) { ^ Warning produced by GCC 5.3 and 6.1, with -Og. Signed-off-by:
Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by:
Giulio Camuffo <giuliocamuffo@gmail.com>
-
- Aug 14, 2016
-
-
Morgane Glidic authored
All the shell protocol details, Xwayland glue and popups (and their grab) are now handled in libweston-desktop. Fullscreen methods (for wl_shell) are removed for now. Signed-off-by:
Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by:
Jonas Ådahl <jadahl@gmail.com> Acked-by:
Giulio Camuffo <giulio.camuffo@kdab.com> Differential Revision: https://phabricator.freedesktop.org/D1209
-