aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-21cursor: Add a more general check for infinite/NaN cursor positionJohn Lindgren
It should be considered a bug if a compositor sets a non-finite cursor position, so fail loudly (in debug builds) if that happens. The existing check in wlr_cursor_warp_closest() is now redundant, and would silently hide such bugs, so remove it.
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-21backend/drm: de-duplicate wlr_drm_mode creationSimon Ser
Introduce a function to convert a drmModeModeInfo into a new wlr_drm_mode.
2022-09-19output: rejigger attach/clear for back bufferSimon Ser
In wlr_output_attach_render(), stop setting wlr_output.pending.buffer. This removes one footgun: using the wlr_buffer at that stage is invalid, because rendering operations haven't been flushed to the GPU yet. We need to wait until output_clear_back_buffer() for the wlr_buffer to be used safely. Instead, set wlr_output.pending.buffer in wlr_output_test() and wlr_output_commit(). Additionally, move the output_clear_back_buffer() from wlr_output_commit_state() to wlr_output_commit(). This reduces the number of calls in the failure path.
2022-09-19output: drop back_buffer variable in wlr_output_commit_state()Simon Ser
We can just use pending.buffer instead. It's completely fine to call wlr_swapchain_set_buffer_submitted() with a buffer which doesn't come from the swapchain, in which case it's a no-op.
2022-09-19output: inline output_attach_render()Simon Ser
No need to have a separate function for this. It's only used once.
2022-09-19render/vulkan: add error handling for vulkan_find_mem_type()Simon Ser
The function returns -1 if it doesn't find a suitable memory type.
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-18output: fix wlr_output_set_gamma() with zero sizeSimon Ser
This is documented to reset the gamma LUT, but we don't handle this properly. While at it, make sure we leave wlr_output.pending in a good state on allocation failure.
2022-09-17xdg-toplevel: validate resize_edgeKirill Primak
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-16Only set max_bpc when full modesetting is being done.vanfanel
2022-09-16Initialize connectors current mode to the mode used by KMS on startup.vanfanel
2022-09-15wlr_drm_lease_v1: Fix use-after-free in backend_destroy()John Lindgren
valgrind said (on exit from labwc): Invalid write of size 8 at 0x487DEAF: wl_list_remove (wayland-util.c:56) by 0x487DF80: wl_signal_emit_mutable (wayland-server.c:2182) by 0x48CD6B7: backend_destroy.part.0.lto_priv.0 (backend.c:41) by 0x48DC19D: multi_backend_destroy (backend.c:58) by 0x4880286: UnknownInlinedFun (wayland-server.c:2315) by 0x4880286: wl_display_destroy (wayland-server.c:1170) by 0x112491: UnknownInlinedFun (server.c:485) by 0x112491: main (main.c:110) Address 0x1f9d0210 is 112 bytes inside a block of size 136 free'd at 0x484426F: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x487DF6D: wl_signal_emit_mutable (wayland-server.c:2179) by 0x48CD6B7: backend_destroy.part.0.lto_priv.0 (backend.c:41) by 0x48DC19D: multi_backend_destroy (backend.c:58) by 0x4880286: UnknownInlinedFun (wayland-server.c:2315) by 0x4880286: wl_display_destroy (wayland-server.c:1170) by 0x112491: UnknownInlinedFun (server.c:485) by 0x112491: main (main.c:110) Block was alloc'd at at 0x4846A73: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4918D4E: drm_lease_device_v1_create (wlr_drm_lease_v1.c:639) by 0x48D3B00: wlr_multi_for_each_backend (backend.c:249) by 0x49191D2: wlr_drm_lease_v1_manager_create (wlr_drm_lease_v1.c:706) by 0x111EE9: UnknownInlinedFun (server.c:384) by 0x111EE9: main (main.c:92)
2022-09-15output/cursor: downgrade error messagesSimon Ser
When the output doesn't support hardware cursors, these errors will be printed. However, these errors are expected and we have a proper fallback. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3457
2022-09-14render/vulkan: improve format loggingSimon Ser
2022-09-14output/render: log human-readable formatSimon Ser
2022-09-14render/allocator/gbm: log human-readable format and modifierSimon Ser
2022-09-14render/egl: improve DMA-BUF format/modifier loggingSimon Ser
For each format and modifier, log supported usage. Log a human-readable format/modifier string.
2022-09-14meson: replace join_paths() with / operatorilliliti
2022-09-12subcompositor: consider mapping after addingKirill Primak
ec8b49c93f869010e360bec501d61c18089fbc61 calls subsurface_consider_map() too early. Instead, call it after emitting new_subsurface signal to let compositors receive a map event.
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-11xdg-foreign-v2: return wlr_xdg_toplevel in verify_is_toplevel()Simon Ser
This makes it clearer that the wlr_xdg_toplevel cannot be NULL.
2022-09-11xdg-foreign-v1: return wlr_xdg_toplevel in verify_is_toplevel()Simon Ser
This makes it clearer that the wlr_xdg_toplevel cannot be NULL.
2022-09-08backend/wayland: drop output_set_custom_mode()Simon Ser
It's an unnecessary wrapper.
2022-09-08wlr_virtual_pointer_v1: fix discrete scrollingConsolatis
It seems it was forgotten to adjust when implementing !3461 High-resolution scroll wheel support
2022-09-07render/vulkan: remove unnecessary castsSimon Ser
No need to go back to the generic wlr_renderer/wlr_texture when passing a Vulkan renderer/texture to an internal function.
2022-09-07render/vulkan: fix format features check for shm texturesSimon Ser
We were checking whether any of the features was supported. We need to check if all of them are. This makes the check consistent with query_modifier_support() above.
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-07egl: modify egl_init_display function definitionfakechen
I think the second parameter of the function should be void* instead of void **, because we use it as a right value in the function. Signed-off-by: fakechen <chenzigui@kylinos.cn> Signed-off-by: sunzg <sunzhigang1@kylinos.cn>
2022-09-06pixel_format: RGBA4444 and RGBA5551 have alpha componentsAlexander Orzechowski
2022-09-05compositor: fix wlr_surface_set_role return value docsSimon Ser
It returns a bool, not an int.
2022-09-05wlr_scene: Clarify surface commit frame eventsAlexander Orzechowski
2022-09-03wlr_scene: Consider screen position when culling backgroundAlexander Orzechowski
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-30backend/x11: report adaptive sync as enabledIsaac Freund
All we can do to influence adaptive sync on the X11 backend is set the _VARIABLE_REFRESH window property like mesa automatically does. We don't have any control beyond that, so we set the state to enabled on creating the output and never allow changing it (just like the Wayland backend).
2022-08-30backend/wayland: report adaptive sync as enabledIsaac Freund
Adaptive sync is effectively always enabled when using the Wayland backend. This is not something we have control over, so we set the state to enabled on creating the output and never allow changing it.
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-30output-layout: improve wlr_output_layout_output_in_direction()Kirill Primak
Now the function checks if the reference output belongs to the layout, and returns NULL if it doesn't.
2022-08-30output-layout: avoid uninitialized wlr_box fieldsKirill Primak
2022-08-30cursor: avoid uninitialized wlr_box fieldsKirill Primak
2022-08-30wlr_compositor: Don't leak region32 when calculating opaque regionAlexander Orzechowski
2022-08-29wlr_scene: Don't leak a region32 when texture failed to uploadAlexander Orzechowski
2022-08-29wlr_scene: More sanity checkingAlexander Orzechowski
The render list should neither contain scene trees or null buffers.
2022-08-29util/set: overhaulKirill Primak
2022-08-29util/array: unclutterKirill Primak