aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-24render/gles2: check GBM is foundSimon Ser
The GLES2 renderer depends on EGL, which depends on GBM for device selection.
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-21xdg-toplevel: post no memory on strdup() failKirill Primak
2022-06-21subcompositor: consider map on creationKirill Primak
wl_subsurface description states: A sub-surface becomes mapped, when a non-NULL wl_buffer is applied and the parent surface is mapped. Note that this doesn't require an explicit commit, which means that a newly created subsurface with a mapped parent and a buffer already attached must be mapped immediately. This can happen with the following sequence of events: - subcompositor.get_subsurface(subsurface, surface, parent) - surface.attach(buffer) - surface.commit() - subsurface.destroy() - subcompositor.get_subsurface(subsurface, surface, parent) Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3449
2022-06-20cursor: re-enable NULL buffer for cursorRouven Czerwinski
The previous wlr_output_cursor_set_image() allows setting a NULL buffer for the cursor to hide it. This functionality was used by sway to hide the cursor, restore the original semantics by allowing NULL buffers again by avoiding the wlr_buffer allocation in case we have NULL pixels and handing a NULL wlr_buffer to wlr_output_cursor_set_buffer().
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-19backend/drm: remove unused CRTC count checkSimon Ser
drmIsKMS already checks for this.
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-14gitignore: remove build dir entriesSimon Ser
Meson creates a .gitignore file in its build directories [1] so that they never get added to Git. These entries assume users will pick a specific build dir name, so they don't work with e.g. "builddir". [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3582#note_1424666
2022-06-12render/egl: don't leak memory on error returnbi4k8
2022-06-11Add missing &bi4k8
2022-06-11render/vulkan/pixel_format: do not leak props->...bi4k8
`vulkan_format_props_query` calls `query_modifier_support` which initializes fields of `props` with allocated memory. this memory is leaked if `query_modifier_support` does not find a supported format and shmtex is not supported, as in this case `add_fmt_props` ends up being false and the allocated fields of `props` are never freed.
2022-06-11xdg-shell: improve shell version checkKirill Primak
2022-06-08scene/layer_shell_v1.c: fix bug in width/height calculationsJohan Malm
...in wlr_scene_layer_surface_v1_configure() Reproduce bug with waybar by setting `"margin": 5,` in ~/.config/waybar/config. It will result in the right edge of the panel extending outside the edge of the output. The bug can also be reproduced with gtk-layer-demo by anchoring left/right/top/bottom and setting respective margins Relates-to: https://github.com/labwc/labwc/issues/382
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.
2022-06-08render/gles2: simplify flipped projectionSimon Ser
Instead of computing the projection, then flipping, just provide the correct transform to wlr_matrix_projection().
2022-06-08output: use state setters in wlr_output_set_*Simon Ser
2022-06-08output: compare state before commitSimon Ser
Before calling wlr_output_impl.{test,commit}, perform a cheap comparison between the current and candidate state. Unset any fields which didn't change.
2022-06-08output: add output state settersSimon Ser
This ensures compositors don't forget to set the committed flag or the mode_type when setting a field.
2022-06-07scene/output_layout: Fix crash in scene_output_layout_output_destroyConsolatis
Closes: #3448
2022-06-07util/global: fix memory leak on display destroy in wlr_global_destroy_safeSimon Ser
If the display is destroyed before wlr_global_destroy_safe's timer fires, the struct destroy_global_data is leaked. This shouldn't cause issues in practice because the timer will never fire, but makes it harder to spot compositor memory leaks.
2022-06-07output: fix make/model/serial memory leakSimon Ser
These have been turned into `char *` in be86145322e6 ("output: turn make/model/serial into char *"), but forgot to add the cleanup logic.
2022-06-07output: fix leak of empty back buffer lockIsaac Freund
This refactors output_ensure_buffer() to not mutate the state passed, making the previous subtle behavior much more explicit. Fixes: d483dd2f ("output: add wlr_output_commit_state") Closes: #3442
2022-06-07backend/drm: fix NULL pointer deference due to typoIsaac Freund
2022-06-07backend/drm: make serial optionalSimon Ser
The EDID 1.4 spec says that the serial number is optional: > If this field is not used, then enter “00h, 00h, 00h, 00h”. Leave the wlr_output.serial field NULL in that case, and hide it from the output description.
2022-06-07backend/drm: unconditionally set "content type" to graphicsSimon Ser
CTA-861-G says that "graphics" is used to indicate non-analog (ie, digital) content. With that bit set, the sink should turn off analog reconstruction and other related filtering.
2022-06-06dmabuf: Don't leak file descriptors on error pathAlexander Orzechowski
2022-06-05Remove remaining wl_signal_emit callsSimon Ser
Replace them with wlr_signal_emit_safe, which correctly handles cases where a listener removes another listener. Reported-by: Isaac Freund <ifreund@ifreund.xyz>
2022-06-05wlr_output_commit_state: Make sure to clear the back bufferAlexander Orzechowski
Fixes: #3445
2022-06-04examples/screencopy-dmabuf: stop using strncpySimon Ser
strncpy doesn't guarantee that the result is zero-terminated.
2022-06-04examples/text-input: stop using strcpy/strcatSimon Ser
These functions are too easy to misuse, they don't do bounds checking.
2022-06-02backend/drm: fix check for no-op commitsIsaac Freund
Since 6936e163b, we short-circut no-op commits as an optimization. However, the logic in the check was slightly off.
2022-06-02wlr_scene_buffer: Update primary_output on output destroyAlexander Orzechowski
2022-06-02wlr_scene_buffer: Call output enter/leave after primary_output calculationAlexander Orzechowski
2022-06-02backend/drm: short-circuit no-op commitsSimon Ser
Some output commits (changing e.g. the output scale or transform) don't require any change in the KMS state. Instead of going through a KMS commit, return early. Blocking KMS commits can be expensive.
2022-06-01backend/drm: make commits without a buffer blockingSimon Ser
The wlr_output API requires compositors to wait for wlr_output.frame before submitting a new buffer. However, compositors can perform a commit which doesn't involve a buffer anytime. If the commit is a modeset, we set DRM_MODE_ATOMIC_ALLOW_MODESET and block until the commit is done. If it isn't, we currently always perform a non-blocking commit. This is an issue because a previous page-flip might still be in flight kernel-side, returning EBUSY. Fix this by using blocking commits when a buffer isn't submitted by the compositor. Closes: https://github.com/swaywm/sway/issues/6962 References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/2239
2022-06-01xdg-shell: add support for v4Simon Ser
This adds a configure_bounds event to let the client know of the preferred maximum window geometry size.
2022-06-01compositor: send WL_SURFACE_ERROR_INVALID_SIZE for non-cursor surfacesSimon Ser
See the discussion at [1]: there's no easy way to fix libwayland-cursor without a new API. Sending the error for other roles will prevent the same client bug from appearing elsewhere. [1]: https://gitlab.freedesktop.org/wayland/wayland/-/issues/194
2022-06-01scene/output-layout: add initial outputsKirill Primak
2022-06-01scene/output-layout: improve ownership logicKirill Primak
This commit ensures that outputs that weren't created by the output layout helper aren't destroyed on the output layout change. Consider the following piece of logic: // struct wlr_output *o1, *o2; // struct wlr_scene *scene; // struct wlr_output_layout *layout; wlr_scene_attach_output_layout(scene, layout); wlr_output_layout_add_auto(layout, o1); struct wlr_scene_output *so2 = wlr_scene_output_create(scene, o2); wlr_output_layout_move(layout, o1, 100, 200); // so2 is invalid now
2022-06-01scene: add wlr_scene_output.events.destroyKirill Primak
2022-05-31scene/wlr_scene.h: fix indentationKirill Primak
2022-05-31output: drop wlr_output_cursor.events.destroySimon Ser
Compositors can just listen to wlr_output.events.destroy instead.
2022-05-31output: re-implement set_image with set_bufferSimon Ser
Avoids having two code-paths doing the same thing.
2022-05-31output: introduce wlr_output_cursor_set_bufferSimon Ser
This will supersede wlr_output_cursor_set_image, and then later also supersede wlr_output_cursor_set_surface.
2022-05-31output: remove noop backend check in wlr_output_cursor_set_imageSimon Ser
The noop backend doesn't exist anymore.
2022-05-31wlr_scene: Move children list from wlr_scene_node to wlr_scene_treeAlexander Orzechowski
2022-05-31wlr_scene: Inline wlr_scene_node_stateAlexander Orzechowski
This seems like nothing interesting was done with this. Let's simplify and allow us some flexibility in the future.