aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-14util/global: remove wl_display arg from wlr_global_destroy_safeSimon Ser
Since [1], we can get the wl_display directly from the wl_global. [1]: https://gitlab.freedesktop.org/wayland/wayland/-/commit/2b22160fb690a76247aa9bd0be3069ff43e8239f
2021-12-14xdg-activation: Allow to submit tokensGuido Günther
Allows the compositor to submit tokens to the pool of currently active tokens. This can be useful when the launcher doesn't use or support xdg-activation-v1 by itself - e.g. when it is X11 based or use gtk_shell1.
2021-12-14seat: Only resend keyboard/pointer enter to focused clientsDavid Rosca
Otherwise it will send enter events to clients that already have keyboard/pointer focus. Notably Qt applications warns about this.
2021-12-13scene: fix wlr_scene_send_frame_done() APIIsaac Freund
This doesn't work if scene outputs are not used as the primary output of scene surfaces will always be NULL. Therefore, take a wlr_scene_output instead of separate wlr_scene and wlr_output arguments and rename the function to wlr_scene_output_send_frame_done(). The actual behavior of the function is unchanged.
2021-12-13tinywl: use wlr_scene_send_frame_done()Isaac Freund
2021-12-13scene: add wlr_scene_send_frame_done()Isaac Freund
2021-12-13scene: add primary output to wlr_scene_surfaceIsaac Freund
This allows compositors to avoid sending multiple frame done events to a surface that is rendered on multiple outputs at once. This may also be used in the same way for presentation feedback.
2021-12-13scene: send surface enter/leave output eventsIsaac Freund
Co-authored-by: Simon Ser <contact@emersion.fr>
2021-12-13backend/drm: add wlr_drm_backend_monitorChris Chamberlain
This helper is responsible for listening for new DRM devices and create new child DRM backends as necessary.
2021-12-13backend: fix return value of attempt_drm_backendChris Chamberlain
The multi backend was returned instead of the primary DRM backend.
2021-12-13output: add support for protocol interface version 4Simon Ser
Two new events are added: name and description. The name is immutable. The description can be updated on-the-fly.
2021-12-09subsurface: don't add to parent list immediatelyKirill Primak
2021-12-09surface: fix non-buffer damage handlingKirill Primak
This commit fixes the way the damage that doesn't come directly from the client is handled.
2021-12-09subsurface: apply position change at the right momentKirill Primak
Subsurface position is considered to be a part of the parent surface's state, therefore it should be modified when the parent is committed.
2021-12-09subsurface: simplify and fix parent commit handlingKirill Primak
2021-12-09Fix incorrect %zd formatting directivesSimon Ser
%zd is for ssize_t. For size_t we should use %zu.
2021-12-09output: introduce wlr_output_set_nameSimon Ser
wlroots picks names for all outputs, but it might be desirable for compositor to override it. For instance, Sway will use a headless output as a fallback in case no outputs are connected. Sway wants to clearly label the fallback output as such and label "real" headless outputs starting from HEADLESS-1.
2021-12-07examples: remove unnecessary partial_dependency() callSimon Ser
The definition of the "drm" dep already calls it.
2021-12-07examples: remove unnecessary wlroots deps for clientsSimon Ser
These clients don't need wlroots.
2021-12-07examples/layer-shell: remove wlroots dependencySimon Ser
This is a client example, it shouldn't use a compositor library like wlroots.
2021-12-07build: move wayland-client dep to backend/wayland/Simon Ser
wayland-client isn't really used by wlroots core, so let's move the dep to where it's needed in the Wayland backend.
2021-12-07linux-dmabuf-v1: add per-surface feedbackSimon Ser
2021-12-07linux-dmabuf-v1: implement v4Simon Ser
Implement a basic version of linux-dmabuf-unstable-v1 version 4. Only default hints are implemented. The new wlr_linux_dmabuf_feedback_v1 data structure will allow compositors to define their own custom hints in the future. This data structure makes it easy to describe feedback metadata. It's converted to a "compiled" form suitable for marshalling over the Wayland socket via feedback_compile.
2021-12-07render: add wlr_renderer_init_wl_shmSimon Ser
This allows compositors to initialize wl_shm without initializing other globals like linux-dmabuf.
2021-12-06surface: fix damage transformationKirill Primak
2021-12-04Fix wlr_scene_node_lower_to_bottomtiosgz
Before this commit, it would keep the node at the top or make it second- topmost.
2021-12-03output: drop front_bufferSimon Ser
This lets backends immediately release committed buffers if they want to.
2021-12-03screencopy-v1: use wlr_output_event_commit.bufferSimon Ser
2021-12-03export-dmabuf-v1: use wlr_output_event_commit.bufferSimon Ser
2021-12-03output: add wlr_output_event_commit.bufferSimon Ser
This allows output commit listeners to access the newly committed buffer. Currently wlr_output.front_buffer is used but it'll get removed in the next commit.
2021-12-03render/drm-format-set: add wlr_drm_format_set_intersectSimon Ser
This intersects two DRM format sets. This is useful for implementing DMA-BUF feedback in compositors, see e.g. the Sway PR [1]. [1]: https://github.com/swaywm/sway/pull/6313
2021-12-03readme: update wrapper libraries linkSimon Ser
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3336
2021-12-02output: fix modifier strippingSimon Ser
DRM formats with an empty modifier list are invalid. Instead of emptying the list, reduce it to { INVALID }. Add a check to make sure the renderer and backend support implicit modifiers, so that we don't fallback on e.g. Vulkan. Closes: https://github.com/swaywm/sway/issues/6692
2021-12-02render/egl: improve modifier support detectionSimon Ser
Support for EXT_image_dma_buf_import_modifiers doesn't necessarily indicate support for modifiers. For instance, Mesa will advertise EXT_image_dma_buf_import_modifiers for all drivers. This is a trick to allow EGL clients to enumerate supported formats (something EXT_image_dma_buf_import is missing). For more information, see [1]. Add a new wlr_egl.has_modifiers flag which indicates whether modifiers are supported. It's set to true if any eglQueryDmaBufModifiersEXT query returned a non-empty list. Use that flag to figure out whether the buffer modifier should be passed to the EGL implementation on import. [1]: https://github.com/KhronosGroup/EGL-Registry/issues/142
2021-12-02render/pixman: advertise MOD_INVALID instead of MOD_LINEARSimon Ser
The backends and allocators use INVALID, but the renderer uses LINEAR. Running a compositor with WLR_RENDERER=pixman results in: 00:00:00.744 [types/output/render.c:59] Failed to pick primary buffer format for output 'WL-1'
2021-12-01render/egl: add wlr_egl_create_with_contextSimon Ser
This allows creating a wlr_egl from an already-existing EGL display and context. This is useful to allow compositors to choose the exact EGL initialization parameters.
2021-12-01render/egl: store IMG_context_priority in wlr_eglSimon Ser
The next commit will split extension lookup and context initialization.
2021-12-01Fix uninitialized variable errors in release modeQuantum
When using `meson --buildtype=release`, `-Wextra -Werror` is passed. This includes `-Werror=maybe-uninitialized`, which complains about the instances fixed in this commit.
2021-11-30backend/wayland: improve wayland input device nameMoon Sungjoon
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3332 This makes input device names include it's type name
2021-11-30tinywl: use wlr_sceneIsaac Freund
2021-11-30scene: add wlr_scene_get_scene_outputSimon Ser
This allows getting a wlr_scene_output from a wlr_output. Since an output can only be added once to a scene-graph there's no ambiguity. This is useful for compositors using wlr_scene_attach_output_layout: the output layout integration automatically creates a scene-graph output for each wlr_output added to the layout.
2021-11-30types/wlr_drm_lease_v1: add NULL check to drm lease resource destroySimon Zeni
2021-11-30output: add wlr_output_get_primary_formatsSimon Ser
This allows compositors to get primary formats without manually calling wlr_output_impl.get_primary_formats. For example, the Sway patch for linux-dmabuf feedback [1] needs this. [1]: https://github.com/swaywm/sway/pull/6313
2021-11-30output: fix typo in wlr_output_impl.get_primary_formats docsSimon Ser
The buffer capabilities indicate whether the formats returned are for DMA-BUFs or shared memory buffers.
2021-11-30output: don't leave dangling cursor_front_bufferSimon Ser
Sometimes we were calling wlr_output_impl.set_cursor with a NULL buffer, but we weren't clearing wlr_output.cursor_front_buffer. Avoid leaving a dangling buffer behind. Introduce a helper function output_set_hardware_cursor which calls wlr_output_impl.set_cursor and keeps cursor_front_buffer in sync.
2021-11-30output: destroy swapchain when disabledSimon Ser
This avoids consuming GPU memory when an output is disabled.
2021-11-29linux-dmabuf-v1: fix implicit checkRouven Czerwinski
The implicit check to filter out LINEAR for dmabuf checked for INVALID twice instead of checking for INVALID & LINEAR. Fix this. Fixes: d37eb5c2eaed ("linux-dmabuf-v1: filter out LINEAR if implicit") Reported-by: Dawid Czeluśniak <czelusniakdawid@gmail.com>
2021-11-29backend/drm: poison buffers which cannot be scanned outSimon Ser
Rather than repeatedly trying to import DMA-BUFs which cannot be scanned out, mark the failed ones with a special "poison" marker. Inspired from [1]. [1]: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/731
2021-11-29Insert new outputs at the end of the listJohn Lindgren
This prevents auto-configuring a new output from changing the position of existing outputs. (v2: simplify insert-at-end logic)
2021-11-28Added whitespace between "output" and "(not"Jonathan Wong