aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-10-12examples: split clients in separate repositorySimon Ser
The client examples are useful to try out protocols, however they don't need to live in the wlroots repository. Having both clients and compositors in the same place is confusing. The wlroots API changes often but protocols are set in stone.
2023-10-12Revert "backend/drm: Automatic non-blocking commits"Simon Ser
This reverts commit 45ba35719e874f7e8651e088c0582fe50301e731. Sadly, this causes regressions on amdgpu [1] and even with these fixed, there are fundamental issues with non-blocking modesets [2]. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3745 [2]: https://oftc.irclog.whitequark.org/dri-devel/2023-10-11#1697031838-1697036920;
2023-10-12build: rename libdrm partial dep to be more explicitSimon Ser
The variable is named "libdrm" but it's a partial dependency with just the headers. Reflect this in the name to avoid confusion (Meson variables are global to the whole project).
2023-10-10Drop wl_client and user data assertions in bind handlersKirill Primak
A client can never be NULL and user data assertions aren't really useful there.
2023-10-10xwayland: add wlr_xwayland_create_with_server()Simon Ser
Allows compositors to set up the server (and shell) on their own.
2023-10-10xwayland/server: add ready flagSimon Ser
Allows one to check whether the server is currently ready.
2023-10-10backend/drm: Automatic non-blocking commitsKenny Levinsen
We currently only perform non-blocking commits for non-modeset commits with a buffer attached. Perform non-blocking commits whenever there is no pending pageflip event. If a non-blocking modeset commit fails, which can happen if the driver implicitly added more CRTCs to the commit that we did not know we had to wait for, retry with a blocking commit. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/2239
2023-10-10docs: add architecture documentSimon Ser
2023-10-10security-context-v1: add commit eventSimon Ser
2023-10-10security-context-v1: new protocol implementationSimon Ser
Co-authored-by: Puck Meerburg <puck@puckipedia.com> References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/68
2023-10-09xwayland: fix memory leakChristopher Snowhill
Fixes: f5797be8a8d410e22fa6397b2217a6a81858d05c Thanks to tesselslate on IRC for reporting. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2023-10-09xdg-shell: fix wlr_xdg_popup_destroy() docsKirill Primak
2023-10-09layer-shell: check for NULL in wlr_layer_surface_v1_destroy()Kirill Primak
2023-10-09output: allow_artifacts -> allow_reconfigurationKenny Levinsen
The name "allow_artifacts" and associated description is very vague, and theoretically allow for tearing behavior. Clarify that we only intend to mean artifacts related to output configuration (e.g., modesets). References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3740
2023-10-08scene/output_layout: Add assert for duplicate output insertionAlexander Orzechowski
Ensure that the output was not added multiple times to the scene output layout.
2023-10-08Add GitLab issue templateSimon Ser
Add recommendations for the most common mistakes when reporting an issue.
2023-10-08util/addon: make wlr_addon_set_finish() saferKirill Primak
wl_list_for_each_safe() breaks if an item immediately after the current one is removed, see https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4358#note_2106260.
2023-10-08scene-output-layout: assert lo->output == so->outputKirill Primak
2023-10-07scene_output_layout: Don't destroy output when output layout is destroyedAlexander Orzechowski
There were a couple of problems with this: 1. The behavior is unexpected. Typically objects in wlroots won't also destroy objects that they depend on. For instance, wlr_scene_output will not destroy the wlr_output when it's destroyed. It shouldn't be any different for scene layouts. 2. This fixes a crash where because wlr_output_layout and wlr_scene_output are both addons to wlr_output, we might get into a situation where wl_list_for_each_safe might malfunction. See [1] This means that the compositor needs to manually destroy the output when they destroy the layout, hence ~breaking. Compositors can just call `wlr_scene_output_destroy()` if they want to destroy both at the same time. [1] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4358#note_2106260 This reverts commit 1a731596c5bcd252d8796cacb59af8b20ceb914f. Co-authored-by: Kirill Primak <vyivel@eclair.cafe>
2023-10-06output_event_commit: Remove committed and bufferAlexander Orzechowski
The newly introduced state struct can be used to retrieve this.
2023-10-06wlr_output: Add applied state to commit eventAlexander Orzechowski
2023-10-06render/allocator: log message when GBM is disabledSimon Ser
When the backend and renderer would need GBM but it's disabled at compile-time, log a message to make this situation easier to debug.
2023-10-06render: log error when requested renderer is compile-time disabledSimon Ser
It can be a bit confusing to debug when the user requests an explicit renderer but it's disabled at build-time. Log an error when that happens.
2023-10-06seat: remove wlr_seat_validate_grab_serial()Kirill Primak
It makes little sense to have a catch-all grab vaildation function, considering that e.g. tablet tool implicit grabs are possible as well. Besides, the function has always returned true anyway.
2023-10-06xwayland: batch client ID request with other property requestsSimon Ser
2023-10-06xwayland: batch property requests when handling new windowSimon Ser
Instead of sending one request, waiting for the reply, and repeating for all properties we're interested in, we can send all property requests in one go and then wait for the server to reply.
2023-10-06xwayland: fix double free wlr_xwayland_shell_v1JiDe Zhang
2023-10-05render/drm_format_set: use published kernel doc URLSimon Ser
The kernel patch has been merged, so this is available in the official docs now.
2023-10-05render/vulkan: constrain blend to output subpass to redrawn regionManuel Stoeckl
This commit only applies to the render pass API.
2023-10-05util: add struct to track union of rectanglesManuel Stoeckl
The new struct rect_union is designed to make it easier to efficiently accumulate a list of rectangles, and then operate on an exact cover of their union. Using rect_union, the times needed to added t rectangles, and then compute their exact cover will be O(t), and something between Ω(t) and O(t^2), depending on the rectangle arrangement. If one tries to do the same by storing a pixman_region32_t and updating it with pixman_region32_union_rect(), then total time needed would be between Ω(t^2) and O(t^3), depending on the input. Without changing the public API (data structure + rectangle ordering rules) for pixman_region32_t, it is impossible to improve its worst case time.
2023-10-05renderer: Don't crash when trying to fallback to pixmanAlexander Orzechowski
Pixman won't be chosen by default if the system has a valid render node but gles2 and vulkan creation failed.
2023-10-05renderer_autocreate_with_drm_fd: Ensure fd isn't bogusAlexander Orzechowski
2023-10-04drop KDE idle protocol supportSimon Zeni
2023-10-04xdg-shell: document wlr_xdg_surface's initialized & initial_commitSimon Ser
2023-10-04contributing: add safety sectionSimon Ser
2023-10-03treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practicalAlexander Orzechowski
2023-10-02docs: replace the less commonly used "::" with "."Kirill Primak
2023-10-02xdg-surface: fix init state flowKirill Primak
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3677
2023-10-02xdg-surface: assert that xdg_surface isn't inertKirill Primak
2023-10-02output_defer_present: Calloc right structAlexander Orzechowski
2023-10-02output: defer fake present events until after commitRose Hudson
Since headless and wayland-without-presentation-feedback were firing present inside their commit impls, present was getting fired before commit, which is cursed. Defer this with an idle timer so that commit handlers can run before present handlers.
2023-10-02backend/drm: restore pending page-flip check when tearingSimon Ser
DRM_MODE_PAGE_FLIP_ASYNC doesn't allow user-space to submit new buffers before waiting for the uevent: the kernel will return EBUSY in that case. Fixes: c2aa7fd965cb ("backend/drm: Add async page flip support to legacy")
2023-10-02cursor: Unset cursor if texture upload failedAlexander Orzechowski
We need to make sure cursor_output_cursor_update() will clear the old texture references through all code paths.
2023-10-02cursor: Remove dead codeAlexander Orzechowski
This conditional would never fire because `cursor_output_cursor_reset_image` nulls the previous xcursor.
2023-10-02cursor: Unset cursor image when there is not available xcursor themeAlexander Orzechowski
This fixes a crash in the case where the last cursor was a client surface cursor but then transitioned into a server managed xcursor that isn't available. Because the logic would return early before, we would continue to reference a texture pointer belonging to a client surface but would otherwise disassociate with it (we wouldn't clear the cursor if the surface is destroyed) resulting an an eventual UAF. Let's just make the cursor invisible if we don't know what to show. It's compositor policy if they want to show a default. Co-authored-by: Scott Moreau <oreaus@gmail.com> Fixes: #3686
2023-10-01types/wlr_tearing_control_v1: use safe list iteration on destroySimon Zeni
2023-09-28backend/drm: Add async page flip support to legacyvaxerski
Atomic doesn't support such flags yet.
2023-09-28staging/tearing-control: Add protocol supportvaxerski
2023-09-27Fix possible crash in server-decoration when surface destroyedBrian J. Tarricone
If the underlying surface is destroyed, but the client has not yet destroyed the server decoration object, and then tries to call request_mode() on it, the compositor will crash, because the wlr_server_decoration struct has been freed, and the wl_resource's user_data member has been NULLed out. Yes, this is certainly an error for the client to do that, but I shouldn't be able to write a buggy (or malicious) Wayland app that can take down the entire compositor.
2023-09-22wlr_scene: clarify wlr_scene_output ownership semanticsJohn Lindgren
wlr_scene_output_layout_add_output() was made public by f5917f024760 ("scene_output_layout: make output adding explicit") but the ownership semantics are not obvious and should be clarified.