aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-06scene/layer_shell: Ignore unmapped exclusion zoneKenny Levinsen
Only the exclusion zone for mapped layer shell surfaces should be respected. In particular, a layer shell surface that was mapped with an exclusion zone but is now unmapped should not adjust the usable area. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3471
2022-08-06xdg_shell: Destroy popups after unmap eventKenny Levinsen
This aligns with wlr_layer_shell_v1, and better matches how we normally use teardown signals.
2022-08-06Set mapped before firing map/unmap eventsKenny Levinsen
This allows whatever the user calls from the signal handlers to react to observe the new state rather than the old, e.g. that a surface is no longer mapped in the unmap handler.
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-28seat/pointer: fix uninitialized variable warningQuantum
This results in the following warning, which in release mode causes an error due to -Werror: ../types/seat/wlr_seat_pointer.c: In function ‘wlr_seat_pointer_send_axis’: ../types/seat/wlr_seat_pointer.c:344:25: error: ‘low_res_value_discrete’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 343 | if (version < WL_POINTER_AXIS_VALUE120_SINCE_VERSION && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 344 | value_discrete != 0 && low_res_value_discrete == 0) { | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors
2022-07-27seat/pointer: rework sending axis eventsKirill Primak
This commit fixes: - sending discrete scrolling events to multiple pointer resources - sending events to clients which don't support wl_pointer.axis_discrete
2022-07-25backend/drm: use drmModeConnectorGetPossibleCrtcsSimon Ser
This function has been merged in libdrm. References: https://gitlab.freedesktop.org/mesa/drm/-/commit/3ee004ef529f43366fdd1f4d32b26872cc82c6ca
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-20render/gles2: simplify alpha depth checkManuel Stoeckl
GL_ALPHA_BITS is the number of bits of the alpha channel of the currently bound frame buffer's color buffer -- which is precisely renderer->current_buffer->rbo . Thus, instead of binding the color buffer and checking its properties, we can query the already bound frame buffer. Note that GL_IMPLEMENTATION_COLOR_READ_{FORMAT,TYPE} are also properties of frame buffer's color buffer.
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-11seat: support high-resolution clientsJosé Expósito
Upgrade the seat protocol to version 8 and handle clients that support high-resolution scroll wheel events. Since the backend already sends discrete values in the 120 range, forwarding them is enough.
2022-07-11backend/wayland: handle high-res scroll eventsJosé Expósito
Receive high-resolution scroll events from the parent compositor using a Wayland listiner and emit the appropiate wlr_pointer signal.
2022-07-11backend/libinput: code style consistencyJosé Expósito
Reduce a level of identation in "handle_pointer_axis" to keep the consistency with "handle_pointer_axis_value120".
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-11build: check if libinput supports high-res scrollJosé Expósito
Starting with Linux Kernel v5.0 two new axes are available for mice that support high-resolution wheel scrolling: REL_WHEEL_HI_RES and REL_HWHEEL_HI_RES. Both axes send data in fractions of 120 where each multiple of 120 amounts to one logical scroll event. Fractions of 120 indicate a wheel movement less than one detent. Three new events are now available on libinput: LIBINPUT_EVENT_POINTER_SCROLL_WHEEL, LIBINPUT_EVENT_POINTER_SCROLL_FINGER, and LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS. These events replace the LIBINPUT_EVENT_POINTER_AXIS event, so new clients should simply ignore that event. Also, two new APIs are available to access the high-resolution data: libinput_event_pointer_get_scroll_value() and libinput_event_pointer_get_scroll_value_v120(). Add a project argument (LIBINPUT_HAS_SCROLL_VALUE120) to allow building against old versions of libinput or, where high-resolution scroll is available, support it.
2022-07-11build: bump Wayland to v1.21José Expósito
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-03wlr_scene: Use direct assignment for damage indicator timestampsAlexander Orzechowski
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-29output: fix missing buffer when using direct scanoutSimon Ser
When using direct scanout back_buffer is NULL. We'd emit a commit event with WLR_OUTPUT_STATE_BUFFER set but with a NULL buffer field, which is non-sensical.
2022-06-29build: fix enabled GBM when allocators=auto and auto_features=disabledSimon Ser
2022-06-28tinywl: exit on backend, renderer or allocator creation failureSimon Zeni
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-24render: use internal_features to indicate EGL supportSimon Ser
Instead of checking whether the wlr_egl dependencies are available in the GLES2 code, introduce internal_features['egl'] and check that field. When updating the EGL dependency list, we no longer need to update the GLES2 logic.
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.