aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-04-14compositor: add wlr_surface_set_preferred_buffer_scale()Simon Ser
References: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/220
2023-04-14compositor: pass version in wlr_compositor_createSimon Ser
This allows wlroots to support newer versions of the interface without breaking the API.
2023-04-14compositor: use defunct_role_object errorKirill Primak
2023-04-14subcompositor: use bad_parent errorKirill Primak
2023-04-14subcompositor: simplify get_subsurface handlerKirill Primak
2023-04-12render/gles2: use byte-aligned rows for glReadPixelsManuel Stoeckl
Setting the GLESv2 parameter GL_PACK_ALIGNMENT to 1 ensures that the stride of the glReadPixels output matches the value computed in `pack_stride`. Since the default value of GL_PACK_ALIGNMENT is 4, this does not make a difference under normal use; but without this patch the stride can be incorrect; for example, with RGB565 buffers and screenshots of regions with odd width.
2023-04-11xcursor: adjust style, use calloc()Simon Ser
Adjust the code style for wlroots, and use calloc() for structs.
2023-04-06output: Drop output_is_direct_scanoutAlexander Orzechowski
2023-04-06output-damage: dropSimon Ser
Compositors can migrate to wlr_damage_ring.
2023-04-06output: drop direct scan-out check in output_basic_test()Simon Ser
wlr_output is not well-suited to checking whether direct scan-out is happening or not. Compositors may want to use their own external swapchains, for instance. Additionally, ab7eabac8433 ("output: leverage wlr_output_configure_primary_swapchain()") makes it so output_basic_test() is called before the output swapchain is initialized, resulting in false positives. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3620
2023-04-06scene: check wlr_output_is_direct_scanout_allowed()Simon Ser
2023-04-06output: add wlr_output_is_direct_scanout_allowed()Simon Ser
This lets compositors check whether direct scan-out is possible. Compositors will soon be responsible for manually calling this function.
2023-04-04output-layer: add support for scaling buffersSimon Ser
This allows callers to set a destination size different from the buffer size to scale them. The DRM backend supports this. The Wayland backend doesn't yet (we'd need to wire up viewporter).
2023-03-28backend/wayland: only unmap layers when necessarySimon Ser
2023-03-28backend/wayland: only update layer position when necessarySimon Ser
2023-03-28backend/wayland: only re-order sub-surfaces when necessarySimon Ser
2023-03-28output-layer: cache current stateSimon Ser
The will be used by the Wayland backend to figure out whether updating sub-surface position is necessary.
2023-03-26render/vulkan: avoid double-close on sync_file FD after semaphore importSimon Ser
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3610
2023-03-24examples/touch: support touch cancel eventsRose Hudson
2023-03-24backend/wayland: support touch cancel eventsRose Hudson
since wayland doesn't provide a touch id in cancel events, track what points are active so we can cancel all of them timestamp is also not provided - use 0 because no one's paying attention to that anyway Closes #3000
2023-03-20backend/drm: log drm_connector_alloc_crtc() failuresSimon Ser
Helps figuring out why e.g. get_primary_formats fails.
2023-03-20backend/wayland: fix undefined reference to wlr_wl_input_device_get_seatzccrs
Amend b7e9ad79 to remove wlr_wl_input_device_get_seat definition. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3611
2023-03-17examples/touch: fix incorrect event typeRose Hudson
2023-03-16drm_format_set: fix realloc sizeBrett Ernst
2023-03-12xdg-shell: improve unmapping logic slightlyKirill Primak
2023-03-10output-layer: require all layers in wlr_output_state.layersSimon Ser
- Simplifies the backends - Avoids having two ways to do the same thing: previously one could disable a layer by either omitting it from wlr_output_state.layers, or by passing a NULL buffer - We can change our mind in the future: we can allow users to omit some layers and define a meaning without breaking the API. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4017#note_1783997
2023-03-10xdg-decoration: send missing protocol errorsIsaac Freund
2023-03-09xwm: emit new_surface/destroy on associate/dissociateKirill Primak
2023-03-09xwm: make atom_map staticKirill Primak
2023-03-09wlr_scene: Skip direct scanout if there is no damageAlexander Orzechowski
2023-03-07xwm: remove misleading commentKirill Primak
The surfaces are stored in the bottom-to-top order, as specified in include/xwayland/xwm.h and expected by wlr_xwayland_surface_restack().
2023-03-06gamma-control-v1: simplify get_gamma_control error handlingSimon Ser
Allocate resources only after checking the request.
2023-03-06gamma-control-v1: fix handling of duplicate controlSimon Ser
When a new client comes in and tries to create a zwlr_gamma_control_v1 object for an output which already has one, we were destroying the old object and early-returning. The early return causes the new object to not be set up properly: it's not inserted in the list and doesn't get the gamma_size event. Fix this by destroying the new object, and leave the old object intact, which is what was the intent I think. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3605
2023-03-04tinywl: init server to zerosKirill Primak
This fixes e.g. accessing grabbed_view on a toplevel unmap if no toplevel was grabbed before.
2023-03-02xdg-shell: improve validation of resize edgesIsaac Freund
The current validation doesn't catch some invalid values such as 3 or 7.
2023-03-01backend/wayland: fix leak of some globalsSimon Ser
Fix a few globals which weren't properly cleaned up. Discovered in [1]. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3604
2023-03-01util/log: prefix WLR_REL_SRC_DIR with underscoreSimon Ser
Just like _WLR_FILENAME and _WLR_ATTRIB_PRINTF, this makes it more obvious that this isn't part of our API.
2023-02-28backend/wayland: destroy zwp_linux_buffer_params_v1 objectsSimon Ser
Don't leak these.
2023-02-28backend/drm: use libdisplay-info for CVT mode generationSimon Ser
2023-02-28backend/drm: use libdisplay-info to parse EDIDSimon Ser
2023-02-28render/vulkan: prefer render node for wlr_renderer_get_drm_fd()Simon Ser
Instead of returning a primary node from wlr_renderer_get_drm_fd(), prefer to return a render node if any.
2023-02-28examples/dmabuf-capture: fix frame_number deprecated in FFmpeg 6.0Simon Ser
Fixes the following error: ../examples/dmabuf-capture.c:524:33: error: 'frame_number' is deprecated [-Werror=deprecated-declarations] 524 | ctx->avctx->frame_number, get_fifo_size(&ctx->vid_frames)); | ^~~
2023-02-27backend: move #ifdefs to nested functionsSimon Ser
Instead of littering #ifdefs everywhere, move them to the dedicated attempt_XXX_backend() functions. This makes the logic in wlr_backend_autocreate() more readable, and provides better error messages when the X11/Wayland backends are disabled at compile-time, or when WLR_BACKENDS contains a backend disabled at compile-time.
2023-02-27backend: make wlr_backend_autocreate() fail when DRM is missingSimon Ser
When we change the required dependencies for the DRM backend, Meson might auto-disable the backend for users missing the new requirements. This results in confused users [1] because they don't notice the "drm-backend: NO" line burried in the Meson logs, and then get a black screen when starting the compositor. Update wlr_backend_autocreate() to refuse to create a backend with only libinput (without DRM). Users really wanting to start their compositor with a libinput backend and without a DRM backend can manually set WLR_BACKENDS. [1]: https://github.com/swaywm/sway/issues/7457
2023-02-26output: allow modeset with buffer while frame is pendingSimon Ser
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3600
2023-02-24output: leverage wlr_output_configure_primary_swapchain()Simon Ser
Replace our current logic to setup the primary swapchain with wlr_output_configure_primary_swapchain(). - Removes some code, reducing duplication - Stop overwriting wlr_output.swapchain with a yet-to-be-tested swapchain: remove the error_destroy_swapchain label.
2023-02-24output: introduce wlr_output_configure_primary_swapchain()Simon Ser
The goal is to simplify wlr_output by moving all of its rendering API into separate helpers. Here is a first step to sunset wlr_output_attach_render(). Instead, compositors call wlr_output_configure_primary_swapchain(), wlr_swapchain_acquire(), wlr_renderer_begin_with_buffer() and wlr_output_attach_buffer(). Note that compositors can supply a base struct wlr_output_state. This is useful to allocate a buffer suitable for submission with a modeset, for instance. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3079 References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3197 References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3984
2023-02-24vulkan: silence -Wint-conversion on 32-bit architecturesJan Beich
render/vulkan/renderer.c:388:70: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'VkFence' (aka 'unsigned long long') [-Werror,-Wint-conversion] VkResult res = vkQueueSubmit(renderer->dev->queue, 1, &submit_info, NULL); ^~~~ render/vulkan/renderer.c:1141:81: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'VkFence' (aka 'unsigned long long') [-Werror,-Wint-conversion] VkResult res = vkQueueSubmit(renderer->dev->queue, submit_count, submit_infos, NULL); ^~~~ /usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL' #define NULL ((void *)0) ^~~~~~~~~~~ /usr/local/include/vulkan/vulkan_core.h:4054:49: note: passing argument to parameter 'fence' here VkFence fence); ^ Fixes: a8a194d695af ("render/vulkan: switch to timeline semaphores")
2023-02-24swapchain: remove allocator listener on destroySimon Ser
Past that point the wlr_allocator is gone and the listeners are invalidated.
2023-02-22Switch to "meson setup"Simon Ser
Fixes this warning: WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.