Simon Ser
e1335a792a
output-layer: add feedback event
2023-02-20 18:38:57 +01:00
Simon Ser
3e0ce761ad
output: add wlr_output_set_layers()
2023-02-20 18:38:09 +01:00
Simon Ser
2f29b0c438
Add wlr_output_layer
...
This is based on previous work [1] [2].
This new API allows compositors to display buffers without needing to
perform rendering operations. This API can be implemented on Wayland
using subsurfaces and on DRM using KMS planes.
Compared to [1], this approach leverages wlr_addon_set to let backends
attach their own private state to layers, removes the pending
state (necessary for interop with wlr_output_commit_state()) and
enum wlr_output_layer_state_field.
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/1985
[2]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3447
2023-02-20 18:38:09 +01:00
John Lindgren
068280201a
xwayland: Read and publish _NET_WM_STRUT_PARTIAL property
...
This is needed for compositors that want to reserve space for
XWayland panels. Such a feature can be useful in a "transitional"
setup, where only the X11 window manager and compositor is replaced
but other components of an X11 desktop environment are still used.
This change simply reads the X11 property; the compositor is free
to ignore it. Thus, compositors that don't want to support such a
"transitional" feature are not impacted.
v2: Update xwayland_surface_associate()
2023-02-13 12:57:20 -05:00
Kenny Levinsen
1225f81a6a
scene: Add fractional scale handling
2023-02-08 16:31:39 +01:00
Kenny Levinsen
efb8df8b22
wp-fractional-scale-v1: new protocol implementation
...
This implements the WIP wp-fractional-scale-v1 protocol.
2023-02-08 16:31:39 +01:00
Simon Ser
0c966f102c
linux-dmabuf-v1: add wlr_linux_dmabuf_feedback_v1_init_with_options()
2023-02-06 19:14:15 +00:00
Simon Ser
b264ec7767
linux-dmabuf-v1: add basic helpers for feedback
2023-02-06 19:14:15 +00:00
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.
2023-02-06 19:14:15 +00:00
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
2023-02-04 02:57:42 -05:00
Simon Ser
eb3e8f08a8
subcompositor: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2023-02-01 20:14:39 +01:00
Simon Ser
c5f7f8ab98
ext-session-lock-v1: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2023-02-01 20:14:12 +01:00
Simon Ser
f9bd416d41
layer-shell-v1: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2023-02-01 20:13:53 +01:00
Simon Ser
49cb85ad72
input-method-v2: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2023-02-01 20:13:30 +01:00
Simon Ser
711a1a3ed4
xdg-shell: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2023-02-01 20:12:49 +01:00
Kirill Primak
fbf5982e38
xwayland/xwm: introduce wlr_xwayland_surface_try_from_wlr_surface()
...
This new function replaces wlr_surface_is_xwayland_surface() and
wlr_xwayland_surface_from_wlr_surface().
2023-02-01 16:13:21 +00:00
Simon Ser
3668c9d86c
examples, tinywl: use "default" cursor instead of "left_ptr"
...
"left_ptr" is the X11 name, "default" is the cursor spec name.
2023-02-01 15:00:42 +01:00
Simon Ser
0f24d27e0b
xdg-shell: rename wlr_xdg_popup.committed to sent_initial_configure
...
We made a similar change to wlr_xdg_toplevel.
2023-01-31 16:27:05 +01:00
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.
2023-01-31 16:20:33 +01:00
Simon Ser
0e54b861e9
seat/keyboard: constify wlr_seat_keyboard_notify_enter()
2023-01-26 15:06:45 +00:00
Simon Ser
695d28c250
seat/keyboard: constify wlr_seat_keyboard_notify_modifiers()
2023-01-26 15:06:45 +00:00
Simon Ser
e44834595d
seat/keyboard: constify args in wlr_seat_keyboard_enter()
2023-01-26 15:06:45 +00:00
Simon Ser
12e04d8f83
seat/keyboard: constify wlr_seat_keyboard_send_modifiers()
2023-01-26 15:06:45 +00:00
Alexander Orzechowski
5007e713b4
wlr_scene: Send intersecting list of scene outputs for outputs_update signal
2023-01-21 16:23:30 -05:00
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.
2023-01-21 12:48:43 +00:00
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
2023-01-03 20:15:55 +00:00
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().
2022-12-23 16:56:42 +01:00
Simon Ser
7081687843
keyboard: improve documentation
2022-12-15 19:49:45 +00:00
xiliuya
7f6d646e0a
keyboard: only update LEDs when changed
2022-12-14 17:51:06 +01:00
Kirill Primak
8f58c060fd
util/region: forbid "shrinking" a region with wlr_region_expand()
...
The logic isn't correct.
2022-12-09 16:46:36 +00:00
Ronan Pigott
f8e70af318
wlr_xdg_activation_v1: add new_token event
2022-12-06 05:45:37 +00:00
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
2022-12-05 18:21:04 +00:00
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.
2022-12-05 18:21:04 +00:00
Kirill Primak
604df8b327
output-layout: fix function decl indentation
2022-12-05 18:21:04 +00:00
Simon Ser
532f3d3c20
xwayland/xwm: replace role with addon
...
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3545
2022-12-05 18:48:15 +01:00
Simon Ser
512deebd82
compositor: add wlr_surface.events.precommit
2022-12-05 10:51:46 +01:00
Simon Ser
c4727240af
compositor: document wlr_surface_{enter,leave,send_frame_done}
2022-12-03 16:52:32 +00:00
Alexander Orzechowski
ec846adb54
wlr_drm: Add missing wlr_buffer import
2022-12-03 07:57:40 -05:00
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.
2022-12-02 14:27:07 +00:00
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
2022-12-01 20:05:04 +00:00
Simon Ser
19dfe99496
output-damage: stop listening for output mode events
...
These will go away.
2022-12-01 20:05:04 +00:00
Simon Ser
fecbaa2bd6
scene: stop listening for output enable/mode events
...
These will go away.
2022-12-01 20:05:04 +00:00
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.
2022-12-01 10:01:35 +00:00
Alexander Orzechowski
db0e962368
wlr_texture: Expose owning renderer
2022-12-01 04:41:43 -05:00
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.
2022-11-30 14:19:46 +01:00
Simon Ser
9c04fd2496
linux-dmabuf-v1: drop wlr_renderer field
...
This isn't used anymore.
2022-11-30 14:19:46 +01:00
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.
2022-11-30 14:19:46 +01:00
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.
2022-11-30 14:14:07 +01:00
Simon Ser
c99c60090c
linux-dmabuf-v1: add version arg to create()
...
To be able to add support for newer versions without breaking
changes.
2022-11-30 14:14:04 +01:00
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.
2022-11-30 14:14:02 +01:00