aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
AgeCommit message (Collapse)Author
2022-11-15backend: drop wlr_backend_get_session()Simon Ser
This no longer has purpose.
2022-11-15backend: return wlr_session in wlr_backend_autocreate() callSimon Ser
Up until now, wlr_backend_autocreate() created the wlr_session and then stuffed it into struct wlr_multi_backend so that compositors can grab it later. This is an abuse of wlr_multi_backend and the wlr_backend API: wlr_backend_get_session() and wlr_multi_backend.session only exist to accomodate the needs of wlr_backend_autocreate(). What's more, the DRM and libinput backends don't implement wlr_backend_impl.get_session. Instead, return the struct wlr_session to the compositor in the wlr_backend_autocreate() call. wlr_backend_get_session() will be removed in the next commit.
2022-11-15Introduce wlr_shmSimon Ser
This is a re-implementation of wl_shm. The motivations for using this over the one shipped in libwayland are: - Properly handle SIGBUS when accessing a wl_buffer's underlying data after the wl_buffer protocol object has been destroyed. With the current code, we just crash if the client does that and then shrinks the backing file. - No need to fight the wl_shm_buffer API anymore. This was awkward because we weren't notified when clients created a wl_shm buffer, and this doesn't play well with our wlr_buffer abstraction. - Access to the underlying FD. This makes it possible to forward the wl_shm buffer to a parent compositor with the Wayland/X11 backends. - Better stride checks. We can use our format table to ensure that the stride is consistent with the bpp and width.
2022-11-15input-inhibitor: deprecateKirill Primak
The protocol itself has been deprecated.
2022-11-15render: add wlr_renderer.events.lostSimon Ser
2022-11-15render: make wlr_renderer_begin return a boolSimon Ser
2022-11-15render: allow wlr_renderer_impl.begin to failSimon Ser
Make it return a bool to indicate success/failure. Adapt the various implementations to check errors.
2022-11-15render: make some wlr_renderer fields privateSimon Ser
2022-11-15render: add docs for wlr_rendererSimon Ser
2022-11-15content-type-v1: add version param to wlr_content_type_manager_v1_create()Simon Ser
2022-11-15output: introduce request_state eventSimon Ser
This allows backends to request the compositor to change the state of an output. References: https://github.com/swaywm/wlroots/issues/2300#issuecomment-761819673
2022-11-15content-type-v1: new protocol implementationSimon Ser
References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/150
2022-11-15compositor: drop wlr_surface.{sx,sy}Simon Ser
The concept of a persistent accumulated surface offset is wrong from a protocol point-of-view. wl_surface.offset is tied to a commit, its interpretation depends on the surface role. For example, with the following sequence: wl_surface@1.offset(1, 1) wl_surface@1.commit() wl_pointer@2.set_cursor(wl_surface@1, 42, 42) The final cursor hotspot is (42, 42): the commit which happened before the set_cursor request has no impact on the hotspot computation. The wlr_output_cursor logic already uses wlr_surface.current.{dx,dy}. wlr_scene's drag icon doesn't, update it accordingly.
2022-11-15render/vulkan: add wlr_vk_texture_has_alphazccrs
Allow to get whether has alpha channel of the VkImage, it can help an optimization to disable blending when the texture doesn't have alpha. Because the VkFormat isn't enough because it's always set to VK_FORMAT_B8G8R8A8_SRGB or VK_FORMAT_R8G8B8A8_SRGB.
2022-11-14wlr_scene: Add drag icon helperAlexander Orzechowski
2022-11-14layer-shell-v1: specify version in constructorSimon Ser
This allows compositors to indicate which features they support, and is required to eventually make this API stable. References: https://github.com/swaywm/sway/issues/7260
2022-11-13xwayland: fix wlr_xwayland_surface_from_wlr_surface() docsKirill Primak
32daa43a454bcea1306ad0976fd4161ce8c7e86f has removed the asymmetry in the relationship of a wlr_surface and an unmapped wlr_xwayland_surface, when wlr_surface.role_data wasn't NULL but wlr_xwayland_surface.surface was. However, this also means that wlr_xwayland_surface_from_wlr_surface() now returns NULL if the wlr_surface is unmapped. Fix the documentation to reflect this.
2022-11-11scene: constify region APIsSimon Ser
2022-11-11region: constifySimon Ser
2022-11-11output: constify damage APIsSimon Ser
2022-11-11output-damage: constify wlr_output_damage_add()Simon Ser
2022-11-11damage-ring: constify wlr_damage_ring_add()Simon Ser
2022-11-11buffer: constify wlr_client_buffer_apply_damage()Simon Ser
2022-11-11render/texture: constify wlr_texture_update_from_buffer()Simon Ser
2022-11-11util/region: constifySimon Ser
2022-11-11output-damage: deprecateKirill Primak
2022-11-11wlr_scene: Fix texture reuseAlexander Orzechowski
Add private interface to ignore a buffer that's locking a client_buffer for damage tracking. This should eventually be replaced by wlr_raster.
2022-11-08damage-ring: add missing headersKirill Primak
2022-11-08render/vulkan: add some interfaces to allow compositors to integratezccrs
Added wlr_vk_renderer_get_* functions to allow get the VkInstance, VkPhysicalDevice, VkDevice, queue family of a wlr_vk_renderer. Added wlr_vk_renderer_get_current_image_attribs function to allow get the VkImage of current renderer buffer to use on compositors. Added wlr_renderer_is_vk function, it's like the wlr_renderer_is_gles2, returns true if the wlr_renderer is a wlr_vk_renderer. Added wlr_vk_image_get_attribs function to get a VkImage and it's extras information (e.g. a VkImageLayout and VkImageFormat of the VkImage) from a wlr_texture.
2022-11-06xwayland/xwm: use role object destroy handlerKirill Primak
2022-11-06xdg-shell: use role object destroy handlerKirill Primak
2022-11-06drag-icon: use role object destroy handlerKirill Primak
2022-11-06input-method: use role object destroy handlerKirill Primak
2022-11-06session-lock: use role object destroy handlerKirill Primak
2022-11-06subcompositor: use role object destroy handlerKirill Primak
2022-11-06layer-shell: use role object destroy handlerKirill Primak
2022-11-06compositor: introduce wlr_surface_destroy_role_object()Kirill Primak
2022-11-05xdg-shell: fix geometry typesKirill Primak
2022-11-02xwayland: split headersSimon Ser
We're about to get one more Xwayland-related thing, and this header already contains two things.
2022-10-24wlr-output-management: implement adaptive syncIsaac Freund
Version 4 of the protocol adds support for reporting/setting adaptive sync state of outputs. Implement these new requests/events in wlroots.
2022-10-20output: clarify custom modes warningSimon Ser
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3514
2022-10-14idle-notify-v1: new protocol implementationSimon Ser
References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/29
2022-10-14xdg-toplevel: send invalid_parent errorKirill Primak
2022-10-07drm-lease-v1: fix error codepathSimon Ser
We were crashing in the error codepath [1] when wlr_drm_create_lease() fails. To fix this, delay the creation of the wlr_drm_lease_v1 until the request is granted. Previously we were allocating that struct early without populating the drm_lease field. However that means we ended up with a half-constructed struct in the error codepath which is annoying to handle. [1]: https://github.com/swaywm/sway/issues/7204#issuecomment-1269797356
2022-10-07output-damage: drop unused pending_attach_renderKirill Primak
2022-10-07output-damage: drop precommit listenerKirill Primak
2022-10-04render: drop wlr_renderer_read_pixels() flagsSimon Ser
These are unused.
2022-10-01screencopy-v1: make sure wlr_buffer enum is visibleConsolatis
.. by including wlr_buffer.h
2022-09-30output: add wlr_output_state.allow_artifactsSimon Ser
When starting up, the compositor might call wlr_output_set_mode() with a mode which is already the current one. wlroots will detect this and make the wlr_output_set_mode() call a no-op. During the next wlr_output_commit() call, wlroots will perform an atomic commit without the ALLOW_MODESET flag. This is an issue, because some drivers need ALLOW_MODESET even if the mode is the same. For instance, if the FB stride or modifier changed, some drivers require a modeset. Add a new flag "allow_artifacts" which is set when the compositor calls mode-setting functions. Use this flag to figure out whether we want to perform atomic commits with ALLOW_MODESET. (The name "allow_artifacts" is picked because ALLOW_MODESET is a misnomer, see [1].) [1]: https://patchwork.freedesktop.org/patch/505107/ Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3499
2022-09-22screencopy-v1: use wlr_buffer APIsSimon Ser
Instead of using low-level wl_shm_buffer and wlr_dmabuf_v1_buffer APIs, use the unified wlr_buffer APIs. That way it doesn't matter what the exact wlr_buffer implementation is used, any which provides the necessary capabilities (data_ptr or dmabuf) would work. Simplifies the logic a bit, and will make the transition to wlr_shm easier.