- 16 Feb, 2019 5 commits
-
-
Sergey Bugaev authored
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 wayland/weston#192Signed-off-by:
Sergey Bugaev <bugaevc@gmail.com>
-
myfreeweb authored
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.
-
myfreeweb authored
This crash was happening *during resizing* of an xwayland window that was destroyed. Discovered by: John Good @archiesix [@daniels: Moved tests below declarations.]
-
myfreeweb authored
-
- 15 Feb, 2019 8 commits
-
-
Philipp Zabel authored
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-g2d4cc4f4/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>
-
Philipp Zabel authored
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>
-
Pekka Paalanen authored
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: wayland/weston#195Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
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>
-
Pekka Paalanen authored
At least the following commits break the libweston ABI, strictly speaking: - a5630eaf - ce62cb3d - 195dadeb - c18ffd39 - ea54c2fd - 27d7c395 - acff29b3 - 67629674 - c9c24773 - 65e1be12 Furhtermore, 64fbd0f4 break the weston executable exported ABI. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Anthony Enrione authored
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>
-
Anthony Enrione authored
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>
-
Anthony Enrione authored
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>
-
- 11 Feb, 2019 2 commits
-
-
Pekka Paalanen authored
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>
-
Pekka Paalanen authored
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>
-
- 07 Feb, 2019 1 commit
-
-
Michael Olbrich authored
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>
-
- 06 Feb, 2019 24 commits
-
-
Michael Teyfel authored
Signed-off-by:
Michael Teyfel <mteyfel@de.adit-jv.com>
-
Michael Teyfel authored
Signed-off-by:
Michael Teyfel <mteyfel@de.adit-jv.com>
-
Michael Teyfel authored
Signed-off-by:
Michael Teyfel <mteyfel@de.adit-jv.com>
-
Michael Teyfel authored
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>
-
Michael Teyfel authored
Signed-off-by:
Michael Teyfel <mteyfel@de.adit-jv.com>
-
Michael Teyfel authored
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>
-
Michael Teyfel authored
Signed-off-by:
Michael Teyfel <mteyfel@de.adit-jv.com>
-
Michael Teyfel authored
The libweston-desktop api is used to send configure event to application. Signed-off-by:
Michael Teyfel <mteyfel@de.adit-jv.com>
-
Michael Teyfel authored
Signed-off-by:
Michael Teyfel <mteyfel@de.adit-jv.com>
-
Michael Teyfel authored
Signed-off-by:
Michael Teyfel <mteyfel@de.adit-jv.com>
-
Michael Teyfel authored
Introduced surface create and configure function for xdg-apps. Signed-off-by:
Michael Teyfel <mteyfel@de.adit-jv.com>
-
Michael Teyfel authored
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>
-
Michael Teyfel authored
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>
-
Michael Teyfel authored
Introduction of IVI_INVALID_ID for xdg-shell applications. Signed-off-by:
Michael Teyfel <mteyfel@de.adit-jv.com>
-
Michael Teyfel authored
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>
-
Michael Teyfel authored
Signed-off-by:
Michael Teyfel <mteyfel@de.adit-jv.com>
-
Pekka Paalanen authored
Make it official that libweston will export the weston_config API, as requested in wayland/weston!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>
-
Alexandros Frantzis authored
Support drawing a mandelbrot set in the fragment shader, rendering it with separate draw calls, one for each cell in a virtual 4x4 grid. This more complex and heavy drawing will potentially help us to visually discover any present or future explicit synchronization issues. The mandelbrot set rendering is enabled with the -m/--mandelbrot command-line switch. Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com>
-
Alexandros Frantzis authored
Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com> Changes in v7: - Merge acquire fence and release fence code blocks in redraw(). - Use 1 << n to define option bitflags. - Remove redundant statement involving OPT_IMPLICIT_SYNC. Changes in v6: - Add option for window size. - Add option for enabling/disabling explicit sync. Changes in v5: - Meson support.
-
Alexandros Frantzis authored
Add tests to check that the zwp_buffer_release_v1 events are emitted per surface commit. To be able to test this we need to use a renderer that holds the buffer until the next buffer is committed, hence we use the pixman renderer. Changes in v7: - Remove references to obsolete noop-hold renderer. Changes in v5: - Meson support. Changes in v4: - Use the pixman renderer instead of the (now gone) noop-hold renderer. Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com>
-
Alexandros Frantzis authored
Implement the get_release request of the zwp_surface_synchronization_v1 interface. This commit implements the zwp_buffer_release_v1 interface. It supports the zwp_buffer_release_v1.fenced_release event for surfaces rendered by the GL renderer, and the zwp_buffer_release_v1.immediate_release event for other cases. Note that the immediate_release event is safe to be used for surface buffers used as planes in the DRM backend, since the backend releases them only after the next page flip that doesn't use the buffers has finished. Changes in v7: - Remove "partial" from commit title and description. - Fix inverted check when clearing used_in_output_repaint flag. Changes in v5: - Use the new, generic explicit sync server error reporting function. - Introduce and use weston_buffer_release_move. - Introduce internally and use weston_buffer_release_destroy. Changes in v4: - Support the zwp_buffer_release_v1.fenced_release event. - Support release fences in the GL renderer. - Assert that pending state buffer_release is always NULL after a commit. - Simplify weston_buffer_release_reference. - Move removal of destroy listener before resource destruction to avoid concerns about use-after-free in weston_buffer_release_reference - Rename weston_buffer_release_reference.busy_count to ref_count. - Add documentation for weston_buffer_release and ..._reference. Changes in v3: - Raise NO_BUFFER for get_release if no buffer has been committed, don't raise UNSUPPORTED_BUFFER for non-dmabuf buffers, so get_release works for all valid buffers. - Destroy the buffer_release object after sending an event. - Track lifetime of buffer_release objects per commit, independently of any buffers. - Use updated protocol interface names. - Use correct format specifier for resource ids. Changes in v2: - Raise UNSUPPORTED_BUFFER at commit if client has requested a buffer_release, but the committed buffer is not a valid linux_dmabuf. - Remove tests that are not viable anymore due to our inability to create dmabuf buffers and fences in a unit-test environment. Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com>
-
Alexandros Frantzis authored
Implement the set_acquire_fence request of the zwp_surface_synchronization_v1 interface. The implementation uses the acquire fence in two ways: 1. If the associated buffer is used as GL render source, an EGLSyncKHR is created from the fence and used to synchronize access. 2. If the associated buffer is used as a plane framebuffer, the acquire fence is treated as an in-fence for the atomic commit operation. If in-fences are not supported and the buffer has an acquire fence, we don't consider it for plane placement. If the used compositor/renderer doesn't support explicit synchronization, we don't advertise the protocol at all. Currently only the DRM and X11 backends when using the GL renderer advertise the protocol for production use. Issues for discussion --------------------- a. Currently, a server-side wait of EGLSyncKHR is performed before using the EGLImage/texture during rendering. Unfortunately, it's not clear from the specs whether this is generally safe to do, or we need to sync before glEGLImageTargetTexture2DOES. The exception is TEXTURE_EXTERNAL_OES where the spec mentions it's enough to sync and then glBindTexture for any changes to take effect. Changes in v5: - Meson support. - Make explicit sync server error reporting more generic, supporting all explicit sync related interfaces not just wp_linux_surface_synchronization. - Fix typo in warning for missing EGL_KHR_wait_sync extension. - Support minor version 2 of the explicit sync protocol (i.e., support fences for opaque EGL buffers). Changes in v4: - Introduce and use fd_clear and and fd_move helpers. - Don't check for a valid buffer when updating surface acquire fence fd from state. - Assert that pending state acquire fence fd is always clear after a commit. - Clarify that WESTON_CAP_EXPLICIT_SYNC applies to just the renderer. - Check for EGL_KHR_wait_sync before using eglWaitSyncKHR. - Dup the acquire fence before passing to EGL. Changes in v3: - Keep acquire_fence_fd in surface instead of buffer. - Clarify that WESTON_CAP_EXPLICIT_SYNC applies to both backend and renderer. - Move comment about non-ownership of in_fence_fd to struct drm_plane_state definition. - Assert that we don't try to use planes with in-fences when using the legacy KMS API. - Remove unnecessary info from wayland error messages. - Handle acquire fence for subsurface commits. - Guard against self-update in fd_update. - Disconnect the client if acquire fence EGLSyncKHR creation or wait fails. - Use updated protocol interface names. - User correct format specifier for resource ids. - Advertise protocol for X11 backend with GL renderer. Changes in v2: - Remove sync file wait fallbacks. - Raise UNSUPPORTED_BUFFER error at commit if we have an acquire fence, but the committed buffer is not a valid linux_dmabuf. - Don't put buffers with in-fences on planes that don't support in-fences. - Don't advertise explicit sync protocol if backend does not support explicit sync. Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com>
-
Alexandros Frantzis authored
Introduce an internal API for dealing with linux sync files, and use it in the codebase to replace ad-hoc sync file management. The linux_sync_file_is_valid function is not currently used, but will be utilized in upcoming commits to implement the zwp_linux_explicit_synchronization_unstable_v1 protocol. Changes in v5: - Meson support. Changes in v3: - Use parameter name in function documentation. - Move kernel UAPI to separate header file. Changes in v2: - Add function documentation - Remove linux_sync_file_wait() Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com>
-
Alexandros Frantzis authored
Introduce support for the zwp_linux_explicit_synchronization_unstable_v1 protocol with an implementation of the zwp_linux_explicit_synchronization_v1 interface. Explicit synchronization provides a more versatile notification mechanism for buffer readiness and availability, and can be used to improve efficiency by integrating with related functionality in display and graphics APIs. In addition, the per-commit nature of the release events provided by this protocol potentially offers a solution to a deficiency of the wl_buffer.release event (see wayland/wayland#46). Support for this protocol depends on the capabilities of the backend, so we don't register it by default but provide a function which each backend will need to call. In this commit only the headless backend when using the noop renderer supports this to enable testing. Note that the zwp_surface_synchronization_v1 interface, which contains the core functionality of the protocol, is not implemented in this commit. Support for it will be added in future commits. Changes in v7: - Added some information in the commit message about the benefits of the explicit sync protocol. Changes in v6: - Fall back to advertising minor version 1 of the explicit sync protocol, although we support minor version 2 features, until the new wayland-protocols version is released. Changes in v5: - Meson support. - Advertise minor version 2 of the explicit sync protocol. Changes in v4: - Enable explicit sync support in the headless backend for all renderers. Changes in v3: - Use wl_resource_get_version() instead of hardcoding version 1. - Use updated protocol interface names. - Use correct format specifier for resource id. - Change test name to 'linux-explicit-synchronization.weston' (s/_/-/g). Changes in v2: - Move implementation to separate file so protocol can be registered on demand by backends. - Register protocol in headless+noop backend for testing purposes. Signed-off-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com>
-