aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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.
2023-09-21render/pass: Remove empty box early returnAlexander Orzechowski
2023-09-21renderer: Use wlr_render_rect_options_get_boxAlexander Orzechowski
Fixes: #3697
2023-09-21render/pass: Introduce wlr_render_rect_options_get_boxAlexander Orzechowski
2023-09-11screencopy_v1: only bind, not render with, buffer in shm copy pathManuel Stoeckl
wlr_renderer_read_pixels does not need to be called inside a render pass; rather, it only needs to have the correct buffer bound to the renderer. This commit optimizes the implementation of frame_shm_copy(...) by only binding the source buffer instead of starting a no-op render pass with it.
2023-09-11output: Mutate frame_pending needs_frame when there is an explicit output commitAlexander Orzechowski
These states would be set if output_init is invoked with a enabled state. This would make frame_pending == true which means wlroots will ignore any further frame events and the compositor will appear dead.
2023-09-10render/vulkan: fix validation error with vkCmdBlitImageManuel Stoeckl
Specfically, VUID-vkCmdBlitImage-srcImage-00247.
2023-09-09render/vulkan: de-duplicate VkImageUsageFlagsSimon Ser
The flags passed to vkCreateImage() must match the flags used when querying formats. Make this clearer by using the same variable.
2023-09-08wlr_scene: Use cached node coordinates where possibleLeo Li
Avoids recalculating node coordinates.
2023-09-07backend/drm: Compute custom mode correctlyAlexander Orzechowski
2023-09-01xdg-popup: validate parentKirill Primak
This matches Mutter's behavior. Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3576
2023-09-01tinywl: set minimum wlroots version in MakefileSimon Ser
2023-08-25backend/drm: drop no-op shortcutSimon Ser
Since e5fc8cd4c734 ("output: trigger frame/present events on all commits on enabled output"), any commit on an enabled output is supposed to trigger frame/present events. The DRM backend was skipping the commit completely for no-op commits. Stop doing so. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3719
2023-08-24render/pass: ensure rect has positive sizeSimon Ser
Ported from wlr_render_rect().
2023-08-23Unify signal data docsKirill Primak
`// struct <name>` appears roughly 4 times as often as `// struct <name> *`. Switch to the former variant everywhere.
2023-08-23render: ensure wlr_render_rect_options->box is nonemptyManuel Stoeckl
This optimization also fixes an validation error with the Vulkan renderer by ensuring vkCmdClearAttachments does not receive empty regions.
2023-08-23output: trigger frame/present events on all commits on enabled outputSimon Ser
Up until now, frame/present events were only triggered when the user submitted a buffer. Change the wlr_output API so that these events are triggered when any commit is applied on an enabled output. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3708
2023-08-23output: don't forbid multiple commits per frameRose Hudson
It's still not possible to commit while a page flip is pending in DRM, but we don't need to enforce that here and allowing it through the common interface can be useful for other backends. This decouples commits from frame scheduling, which is going to make the new frame schedulers easier to implement.
2023-08-23backend/drm: report !presented if session is inactiveRose Hudson
2023-08-23backend/drm: don't set frame_pending on modesetRose Hudson
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3664#note_2020392 we're gonna have to trust Simon on this one 🤞
2023-08-23render: only open DRM render node if necessarySimon Ser
Only open a render node if we actually need one (ie, if we're about to attempt GLES2 or Vulkan).
2023-08-22scene_output_layout: make output adding explicitRose Hudson
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3709
2023-08-22output_layout: return wlr_output_layout_output when adding outputRose Hudson
This will be used for the scene-graph integration.
2023-08-22wlr_output: Set current_mode during new custom modeAlexander Orzechowski
When setting a custom mode current_mode will not be reset. That means that next time the compositor tries to reset back from the custom mode, it will compare against the stale current_mode and unset WLR_OUTPUT_STATE_MODE erroneously.
2023-08-21compositor: drop wlr_surface_destroy_role_object()Simon Ser
This function is now unnecessary.
2023-08-21xdg-shell: rework rolesKirill Primak
2023-08-21xdg-popup: avoid using wlr_surface_destroy_role_object()Kirill Primak
2023-08-21Don't assume xdg_surface.{toplevel,popup} is non-NULLKirill Primak
This assumption will become incorrect with future commits.
2023-08-21xdg-shell: don't return anything from create_xdg_surface()Kirill Primak
2023-08-21egl: Don't assume display is owned when KHR_display_reference is unsupportedAlexander Orzechowski
We could potentially leak a display here, but not really because the display acts as a singleton that will be returned next time a renderer of the same device is created.
2023-08-21egl: Remove dead codeAlexander Orzechowski
Display is always NULL here since egl_init is always last to be called.
2023-08-21buffer: make wlr_client_buffer functions privateSimon Ser
We want to eventually remove this. Let's make sure compositors don't start using either of these functions.
2023-08-21backend/headless: fix broken output frame eventsSimon Ser
frame_delay was set to 0. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3712
2023-08-20renderer/vulkan: Defer device lost signal until end of passAlexander Orzechowski
If the compositor were to try to handle a GPU reset within the lost signal (by recreating the renderer) we should avoid referencing renderer resources after the lost signal. This prevents use after free for such compositors.