aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2022-09-21output: fix back buffer checksSimon Ser
The back buffer is no longer set at commit time since 0556aa0c5918 ("output: rejigger attach/clear for back buffer"). Instead, check whether the buffer belongs to the output swapchain. This is more robust. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3496
2022-09-19render/egl: add support for EGL_KHR_display_referenceSimon Ser
See the spec at [1]. tl;dr EGL has terrible defaults: eglTerminate() may have side-effects on completely unrelated EGLDisplay objects. This extension allows us to opt-in to get the sane behavior: eglTerminate() only free's our own EGLDisplay without affecting others. [1]: https://registry.khronos.org/EGL/extensions/KHR/EGL_KHR_display_reference.txt
2022-09-17single-pixel-buffer-v1: fix header guard nameSimon Ser
Be consistent with other headers.
2022-09-16buffer: split into multiple filesSimon Ser
wlr_buffer.c is difficult to read because it contains a mixed bag of unrelated things: base buffer type, buffer implementations, buffer resource factory, and client buffer. Split each of these into their own file.
2022-09-12subcompositor: move+rename subsurface_parent_commit()Kirill Primak
2022-09-11xdg-foreign-v2: s/unmap/destroyKirill Primak
Same as the previous commit.
2022-09-11xdg-foreign-v1: s/unmap/destroyKirill Primak
dac040f87fee1cfdd7660aa1786b0734d95e03a4 mistakenly renamed xdg_surface_destroy listener, which was listening to *unmap* events, to xdg_surface_unmap. The actual fix, however, is to listen to destroy events. This fixes various crashes.
2022-09-07render/vulkan: drop wlr_vk_device.extensionsSimon Ser
We don't need to store the list of enabled extensions. While at it, rename variables to be less confusing.
2022-09-07render/vulkan: drop ext params from vulkan_device_create()Simon Ser
These are unused.
2022-09-05compositor: fix wlr_surface_set_role return value docsSimon Ser
It returns a bool, not an int.
2022-08-30output: remove unknown adaptive sync stateIsaac Freund
This was previously used by the X11 backend but is no longer required since the previous commit.
2022-08-30output: fail commits if adaptive sync cannot be enabledSimon Ser
Previously, adaptive sync was just a hint and wouldn't make any atomic commit fail if the backend didn't support it. The main reason is wlr_output_test wasn't supported at the time. Now that we have a way for compositors to test whether a change can work, let's remove the exception for adaptive sync and convert it to a regular output state field.
2022-08-29util/set: overhaulKirill Primak
2022-08-29util/array: unclutterKirill Primak
2022-08-22util: Introduce env helpersAlexander Orzechowski
2022-08-19wlr_scene: Convert render_list to wl_arrayKenny Levinsen
This simplifies some of the growth logic, but uses array_realloc to shrink the array if needed.
2022-08-19util/array: Add array_realloc for wl_arrayKenny Levinsen
array_realloc will grow the array for the target size like wl_insert_add, but will also shrink the array if the target size is sufficiently smaller than the current allocation.
2022-08-18Remove wlr_signal_emit_safeAlexander Orzechowski
2022-08-15util/box: Introduce wlr_fbox_equalAlexander Orzechowski
2022-08-15util/box: Introduce wlr_box_equalAlexander Orzechowski
2022-08-14wlr_scene: Remove unused typedefAlexander Orzechowski
2022-08-14wlr_scene: Account for occlusion by other scene nodes when calculating ↵Alexander Orzechowski
visibility
2022-08-14wlr_scene: Introduce buffer opaque region metadataAlexander Orzechowski
2022-08-14wlr_scene: Rewrite direct scan out logic to rely on visibilityAlexander Orzechowski
Also make the regular rendering logic use the introduced render list.
2022-08-14wlr_scene: Add per scene node visibilityAlexander Orzechowski
2022-08-12surface: add WLR_SURFACE_STATE_OFFSETSimon Ser
This indicates whether the surface offset has changed.
2022-08-12render: replace wlr_texture_write_pixels with update_from_bufferSimon Ser
This lets the renderer handle the wlr_buffer directly, just like it does in texture_from_buffer. This also allows the renderer to batch the rectangle updates, and update more than the damage region if desirable (e.g. too many rects), so can be more efficient.
2022-08-11backend/wayland: fix touch device not added on startupSimon Ser
We were firing the new_input signal on backend initialization, before the compositor had the chance to add a listener for it. Mimick what's done for wl_keyboard: if the backend hasn't been started, delay wl_touch initialization. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3473
2022-08-10backend/drm: drop enum wlr_drm_connector_statusSimon Ser
We can just use libdrm's drmModeConnection enum instead.
2022-08-10backend/drm: drop WLR_DRM_CONN_NEEDS_MODESETSimon Ser
- Add wlr_output.enabled checks to CONNECTED checks - Replace NEEDS_MODESET with CONNECTED
2022-08-10backend/drm: remove unused WLR_DRM_CONN_CLEANUPSimon Ser
2022-08-08wlr_scene: Add option to disable direct scanoutAlexander Orzechowski
Closes: #3405 Supersedes: !3562 Co-authored-by: Xiao YaoBing <xiaoyaobing@qq.com>
2022-08-03single-pixel-buffer-v1: new protocol implementationSimon Ser
This implements the single-pixel-buffer-v1 protocol [1], to allow clients to create 1x1 buffers with a single color. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/104
2022-08-01xdg-shell: add support for v5Simon Ser
This version adds a wm_capabilities event.
2022-07-25backend/drm: use drmModeGetConnectorTypeNameSimon Ser
No need to manually maintain this table now. The wlroots names and the libdrm (= kernel) names all match. References: https://gitlab.freedesktop.org/mesa/drm/-/commit/50f8d517733d24fce6693ffae552f9833e2e6aa9
2022-07-11seat: support low-resolution clientsJosé Expósito
When the client doesn't support high-resolution scroll, accumulate deltas until we can notify a discrete event. Some mice have a free spinning wheel, making possible to lock the wheel when the accumulator value is not 0. To avoid synchronization issues between the mouse wheel and the accumulators, store the last delta and when the scroll direction changes, reset the accumulator.
2022-07-11backend/libinput: handle high-res scroll eventsJosé Expósito
On newer versions of libinput, the event LIBINPUT_EVENT_POINTER_AXIS has been deprecated in favour of LIBINPUT_EVENT_POINTER_SCROLL_WHEEL, LIBINPUT_EVENT_POINTER_SCROLL_FINGER and LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS. Where new events are provided by the backend, ignore LIBINPUT_EVENT_POINTER_AXIS, receive high-resolution scroll events from libinput and emit the appropiate wlr_pointer signal.
2022-07-11pointer: transform low-res to high-res axis eventsJosé Expósito
Currently, the "wlr_event_pointer_axis" event stores low-resolution values in its "delta_discrete" field. Low-resolution values are always multiples of one, i.e., 1 for one wheel detent, 2 for two wheel detents, etc. In order to simplify internal handling of events, always transform in the backend from the low-resolution value into the high-resolution value. The transformation is performed by multiplying by 120. The 120 magic number is used by the kernel and it is exposed to clients in the "WLR_POINTER_AXIS_DISCRETE_STEP" constant.
2022-07-03wlr_scene: Maintain damage highlight regions per outputAlexander Orzechowski
The logic doesn't support handling multiple outputs so let's not break the assumption and handle damages per output much like how damage_ring is done.
2022-07-02Document NULL return value of foo_from_wlr_surface() functionsIsaac Freund
wlr_xdg_surface_from_wlr_surface() for example may return NULL even if the surface has the xdg surface role if the corresponding xdg surface has been destroyed.
2022-06-29scene: add missing output damage listenerKirill Primak
This is necessary to handle damage coming from the backend and software cursors.
2022-06-29scene: switch to wlr_damage_ringKirill Primak
2022-06-29types: add wlr_damage_ringKirill Primak
wlr_damage_ring is effectively wlr_output_damage untied from wlr_output.
2022-06-28wlr_{keyboard,pointer,touch}: Update event docsKenny Levinsen
Events used by our input devices were recently renamed from wlr_event_* to wlr_*_event, but the documentation and a single point of use was not updated accordingly. Regressed by: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3484
2022-06-21wlr_input_device: remove anon union fieldIsaac Freund
This union is unnecessary since the recent input device refactor and can now be replaced by wlr_*_from_input_device() functions.
2022-06-21xdg-popup: use configure fieldsKirill Primak
2022-06-19backend/drm: set "max bpc" to the maxSimon Ser
"max bpc" is a maximum value, the driver is free to choose a smaller value depending on the bandwidth available. Some faulty monitors misbehave with higher bpc values. We'll add a workaround if users get hit by these in practice. References: https://gitlab.freedesktop.org/wayland/weston/-/issues/612
2022-06-17output-management-v1: add wlr_output_head_v1_state_apply()Simon Ser
This function applies a configuration sent by a client on a struct wlr_output_state.
2022-06-16render/texture: drop wlr_texture_is_opaqueSimon Ser
Whether a texture is opaque or not doesn't depend on the renderer at all, it just depends on the source buffer. Instead of forcing all renderers to implement wlr_texture_impl.is_opaque, let's move this in common code and use the wlr_buffer format to know whether a texture will be opaque.
2022-06-08matrix: remove wlr_matrix_projection()Simon Ser
69477051ccff ("matrix: deprecate wlr_matrix_projection") marked it as deprecated. 1 year later, we can now remove it from our public API.