Kenny Levinsen
1225f81a6a
scene: Add fractional scale handling
2 years ago
Kenny Levinsen
efb8df8b22
wp-fractional-scale-v1: new protocol implementation
...
This implements the WIP wp-fractional-scale-v1 protocol.
2 years ago
Simon Ser
0c966f102c
linux-dmabuf-v1: add wlr_linux_dmabuf_feedback_v1_init_with_options()
2 years ago
Simon Ser
b264ec7767
linux-dmabuf-v1: add basic helpers for feedback
2 years ago
Simon Ser
5cd14dfc91
linux-dmabuf-v1: stop using const in feedback
...
Instead of using const pointers, use structs owned by the tranche.
This will allow wlroots to expose helpers to build feedback
objects.
2 years ago
Alexander Orzechowski
7b32c25a4f
wlr_scene: Rename wlr_scene_surface_from_buffer
...
This renames it to wlr_scene_surface_try_from_buffer to be more clear
that this function can return NULL. This is inline with the rest of
wlroots[1].
[1] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3991
2 years ago
Simon Ser
eb3e8f08a8
subcompositor: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2 years ago
Simon Ser
c5f7f8ab98
ext-session-lock-v1: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2 years ago
Simon Ser
f9bd416d41
layer-shell-v1: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2 years ago
Simon Ser
49cb85ad72
input-method-v2: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2 years ago
Simon Ser
711a1a3ed4
xdg-shell: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2 years ago
Simon Ser
0f24d27e0b
xdg-shell: rename wlr_xdg_popup.committed to sent_initial_configure
...
We made a similar change to wlr_xdg_toplevel.
2 years ago
Simon Ser
df0c926a7a
xdg-shell: rename wlr_xdg_toplevel.added to sent_initial_configure
...
This is more descriptive, and avoids the confusion with
wlr_xdg_surface.added.
2 years ago
Simon Ser
0e54b861e9
seat/keyboard: constify wlr_seat_keyboard_notify_enter()
2 years ago
Simon Ser
695d28c250
seat/keyboard: constify wlr_seat_keyboard_notify_modifiers()
2 years ago
Simon Ser
e44834595d
seat/keyboard: constify args in wlr_seat_keyboard_enter()
2 years ago
Simon Ser
12e04d8f83
seat/keyboard: constify wlr_seat_keyboard_send_modifiers()
2 years ago
Alexander Orzechowski
5007e713b4
wlr_scene: Send intersecting list of scene outputs for outputs_update signal
2 years ago
Kirill Primak
843b874f22
output-layout: improve closest point for no outputs case
...
Without outputs, all points are equally invalid anyway, but for e.g.
cursor warping it makes more sense to preserve the original position.
2 years ago
Simon Ser
e93ecc669c
tablet-tool: revert bitfield in enum wlr_tablet_tool_tip_state
...
This was changed to a bitfield by mistake.
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3484#note_1697926
2 years ago
Isaac Freund
869af1cfbb
session-lock: send more protocol errors
...
The invalid_destroy and invalid_unlock protocol errors aren't currently
sent by wlroots and instead left up to the compositor. However, we can
handle these as well without much additional complexity.
This also adds a missing wl_resource_destroy() call if the lock is inert
in lock_handle_unlock_and_destroy().
2 years ago
Simon Ser
7081687843
keyboard: improve documentation
2 years ago
xiliuya
7f6d646e0a
keyboard: only update LEDs when changed
2 years ago
Ronan Pigott
f8e70af318
wlr_xdg_activation_v1: add new_token event
2 years ago
Kirill Primak
097ea84cda
output-layout: improve API
...
- wlr_output_layout_add{,_auto}() now return a bool indicating whether
the function has succeeded.
- wlr_output_layout_move() is removed.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1083
2 years ago
Kirill Primak
27ea18cc33
output-layout: remove wlr_output_layout_output_state
...
wlroots uses "// private state" comments to denote structure fields
which shouldn't be accessed by compositors, so let's drop
wlr_output_layout_output_state and inline its fields into
wlr_output_layout_output; this also simplifies layout output creation.
2 years ago
Kirill Primak
604df8b327
output-layout: fix function decl indentation
2 years ago
Simon Ser
512deebd82
compositor: add wlr_surface.events.precommit
2 years ago
Simon Ser
c4727240af
compositor: document wlr_surface_{enter,leave,send_frame_done}
2 years ago
Alexander Orzechowski
ec846adb54
wlr_drm: Add missing wlr_buffer import
2 years ago
Simon Ser
f36a5915da
wl-drm: don't store wlr_renderer
...
Query the formats at init time, then forget about the renderer.
This will allow wl_drm to be created with a list of formats instead
of a renderer, and will behave better after a GPU reset.
2 years ago
Simon Ser
c8eb24d30e
output: drop enable/mode events
...
The backend no longer changes the output state behind the
compositor's back. Instead, compositors can listen to the "commit"
event and check for WLR_OUTPUT_STATE_ENABLED/WLR_OUTPUT_STATE_MODE.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/2300
2 years ago
Simon Ser
19dfe99496
output-damage: stop listening for output mode events
...
These will go away.
2 years ago
Simon Ser
fecbaa2bd6
scene: stop listening for output enable/mode events
...
These will go away.
2 years ago
Alexander Orzechowski
fe891ebd4e
output_init_render: Allow re-initialization
...
This lets the compositor call this function after the fact to replace
the renderer/allocator after a renderer context lost.
2 years ago
Simon Ser
f103dc74d8
linux-dmabuf-v1: introduce wlr_linux_dmabuf_v1_create()
...
Some compositors may want to use the linux-dmabuf-v1 implementation
with a completely custom renderer. Add a function to create the
global with a default feedback.
2 years ago
Simon Ser
9c04fd2496
linux-dmabuf-v1: drop wlr_renderer field
...
This isn't used anymore.
2 years ago
Simon Ser
88493d1f7c
linux-dmabuf-v1: don't use wlr_renderer to send legacy format list
...
The wlr_renderer field will go away in a subsequent commit.
Build the legacy device list from the default feedback instead.
2 years ago
Simon Ser
d45cffb865
linux-dmabuf-v1: don't use wlr_renderer to sanity check DMA-BUFs
...
The wlr_renderer field will go away in a subsequent commit.
Instead of trying to create a texture, try to import the DMA-BUF
into the DRM device FD.
2 years ago
Simon Ser
c99c60090c
linux-dmabuf-v1: add version arg to create()
...
To be able to add support for newer versions without breaking
changes.
2 years ago
Simon Ser
444d94ef89
linux-dmabuf-v1: add "_with_renderer" suffix to create() function
...
Make it clear this is a helper consuming a wlr_renderer. We'll
add a lower-level create() function which doesn't take it in the
next commit.
2 years ago
Simon Ser
76b3687739
shm: add create() function without a wlr_renderer
...
This allows compositors which don't use wlr_renderer to still use
wlroots' wl_shm implementation.
2 years ago
Kirill Primak
060df4c6c0
scene: introduce wlr_scene_buffer.events.outputs_update
...
This event is useful for e.g. sending the preferred buffer scale to the
client.
2 years ago
Simon Ser
42016fa262
compositor: make renderer optional
...
This is a first step towards moving texture uploading out of
wlr_compositor.
This commit allows compositors to opt-out of the texture uploading
by passing a NULL wlr_renderer. An immediate user of this is
gamescope, which currently implements a stub wlr_renderer just to
make wlr_compositor happy.
2 years ago
Simon Ser
359df5ef84
compsitor: document wlr_compositor_create()
2 years ago
Kirill Primak
236918d52e
Nuke deprecated include/wlr/types/wlr_surface.h
...
Use wlr_compositor.h and wlr_subcompositor.h instead.
2 years ago
Simon Ser
0ae3c7b1a2
Introduce wlr_shm
...
This is a re-implementation of wl_shm. The motivations for using
this over the one shipped in libwayland are:
- Properly handle SIGBUS when accessing a wl_buffer's underlying
data after the wl_buffer protocol object has been destroyed.
With the current code, we just crash if the client does that
and then shrinks the backing file.
- No need to fight the wl_shm_buffer API anymore. This was awkward
because we weren't notified when clients created a wl_shm buffer,
and this doesn't play well with our wlr_buffer abstraction.
- Access to the underlying FD. This makes it possible to forward
the wl_shm buffer to a parent compositor with the Wayland/X11
backends.
- Better stride checks. We can use our format table to ensure that
the stride is consistent with the bpp and width.
2 years ago
Kirill Primak
8cfd44980b
input-inhibitor: deprecate
...
The protocol itself has been deprecated.
2 years ago
Simon Ser
bf623ec782
content-type-v1: add version param to wlr_content_type_manager_v1_create()
2 years ago
Simon Ser
ff55663906
output: introduce request_state event
...
This allows backends to request the compositor to change the state
of an output.
References: https://github.com/swaywm/wlroots/issues/2300#issuecomment-761819673
2 years ago