Alexander Orzechowski
dfeb1309a8
wlr_scene: Add presentation signal for wlr_scene_buffer
3 years ago
Alexander Orzechowski
7e383c6a6a
wlr_scene: Make wlr_scene_render_output private
...
This function sidesteps damage tracking and output awareness on
buffers/surfaces. This function isn't a great fit for the API.
Let's also inline the function and simplify it.
3 years ago
Alexander Orzechowski
933ff0e60c
wlr_scene: Fix missing calls to scene_node_update_outputs
...
There were a couple places this was missing
- on mode change of an output. If the resolution changes for example
nodes may fall out of the view.
- on commits on an output for scale or transform changes
- when the transform of a buffer is changed. If the dest size is not
set, the buffer may have been rotated potentially changing its size
if the buffer width != height
3 years ago
Alexander Orzechowski
c46b53d0b0
wlr_scene: Add output_enter/output_leave signals
...
When we destroy a scene buffer, let's make sure that we call
output_leave signals before we finish the node which will call destroy
listeners.
3 years ago
Alexander Orzechowski
61dab42c70
wlr_scene: Add setter for buffer of a wlr_scene_buffer
3 years ago
Alexander Orzechowski
039a31df9a
wlr_scene: Allow buffer in wlr_scene_buffer to be NULL
...
This is useful to emulate an unmapped surface.
3 years ago
Simon Ser
8fe3aa29da
xdg-shell: specify version in wlr_xdg_shell_create
...
With protocol additions such as [1], compositors currently have no
way to opt out of the version upgrade. The protocol upgrade will
always be backwards-compatible but may require new compositor
features.
The status quo doesn't make it possible to ship a protocol addition
without breaking the wlroots API. This will be an issue for API
stabilization [2].
To address this, let compositors provide a maximum version in the
function creating the global. We need to support all previous versions
of the interface anyways because of older clients.
This mechanism works the same way as Wayland clients passing a version
in wl_global.bind.
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3514
[2]: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1008
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3397
3 years ago
Kirill Primak
dec2565f2b
xdg-toplevel: don't schedule configures on state requests
3 years ago
Kirill Primak
04aa44b4df
xdg-foreign-v2: treat unmapped parents as NULL
3 years ago
Kirill Primak
dac040f87f
xdg-foreign-v1: treat unmapped parents as NULL
3 years ago
Leonardo Hernández Hernández
4519117a68
seat: take wlr_keyboard in wlr_seat_set_keyboard()
...
Signed-off-by: Leonardo Hernández Hernández <leohdz172@protonmail.com>
3 years ago
Guido Günther
4cc2a03620
layer-shell: Make wlr_layer_surface_v1_from_resource public
...
This allows compositors to leverage the `wl_instance_of` based type
check.
3 years ago
Simon Zeni
aaf787ee56
types/wlr_touch: uniformize events name
3 years ago
Simon Zeni
e732c5c895
types/wlr_tablet_tool: uniformize events name
3 years ago
Simon Zeni
d1f543a9d8
types/wlr_tablet_pad: uniformize events name
3 years ago
Simon Zeni
13d7fa2f03
types/wlr_switch: uniformize events name
3 years ago
Simon Zeni
9a17200446
types/wlr_keyboard: uniformize events name
3 years ago
Simon Zeni
bd6c000d14
types/wlr_pointer: uniformize events name
3 years ago
Simon Zeni
96ccc50c57
types/wlr_input_device: move width_mm and height_mm fields to wlr_tablet and wlr_touch
3 years ago
Simon Zeni
a92e5f8d46
types/wlr_input_device: move output_name field to wlr_pointer and wlr_touch
3 years ago
Alexander Orzechowski
74381f3bc3
types/wlr_output: Handle subpixel hints through output commits
3 years ago
Simon Ser
68f2f8cf92
Revert "scene: try to import buffers as textures before rendering"
...
This reverts commit 3db1bcbe64
.
Since [1], importing buffers as textures before wlr_renderer_begin isn't
necessary anymore.
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3464
3 years ago
Simon Zeni
4c8ecfcd4a
types/wlr_virtual_pointer_v1: remove destroy event
...
The destroy event from the pointer base wlr_input_device must be used
3 years ago
Simon Zeni
45c8771735
types/wlr_virtual_keyboard_v1: remove destroy event
...
The destroy event from the keyboard base wlr_input_device must be used
3 years ago
Simon Zeni
eae8952e17
types/wlr_keyboard: remove destroy event
...
The destroy event from the base wlr_input_device must be used
3 years ago
David96
7a2c96dcbd
types/wlr_tablet_tool: remove name ambiguity
...
It wasn't clear in the backend whether to use name or base.name, change
it so base.name has to be used.
Fixes https://github.com/swaywm/sway/issues/6884
3 years ago
Isaac Freund
4792446ee8
wlr_switch: remove WLR_SWITCH_STATE_TOGGLE
...
This was originally added in 810c7b7
for use in rootston's input config
handling. It has never actually been part of the wlroots API and
shouldn't exist.
3 years ago
Simon Zeni
cfed039c9a
types/wlr_input_device: move init and finish function to private API
3 years ago
Simon Zeni
1bb2631c5c
types/wlr_input_device: remove wlr_input_device_destroy
3 years ago
Simon Ser
39b68ea47a
buffer: extract interface to separate header
...
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3389
3 years ago
Simon Zeni
e279266f71
interfaces: remove wlr_input_device_impl
3 years ago
Simon Zeni
1acc931cf0
types/wlr_switch: constify impl
3 years ago
Simon Zeni
f1181c34ed
types/wlr_tablet_pad: constify impl
3 years ago
Kirill Primak
511f137f8f
xdg-positioner: rewrite unconstraining, untie from xdg-popup
3 years ago
Kirill Primak
5879e77d68
xdg-positioner: rename structs
...
To be consistent with other wlr_xdg_* structs,
wlr_xdg_positioner_resource is renamed to wlr_xdg_positioner and made
public, and wlr_xdg_positioner is renamed to wlr_xdg_positioner_rules.
Functions which operated on wlr_xdg_positioner were renamed and updated
accordingly.
3 years ago
Simon Zeni
edfb332b24
types/wlr_touch: add base wlr_input_device
...
wlr_touch now owns its wlr_input_device. It will be initialized when the
tablet tool is initialized, and finished when the touch is destroyed.
3 years ago
Simon Zeni
7dfee50350
types/wlr_tablet_tool: add base wlr_input_device
...
wlr_tablet_tool owns its wlr_input_device. It will be initialized when the
tablet tool is initialized, and finished when the tablet tool is destroyed.
3 years ago
Simon Zeni
a662743610
types/wlr_tablet_pad: add base wlr_input_device
...
wlr_tablet_pad owns its wlr_input_device. It will be initialized when the
tablet pad is initialized, and finished when the tablet pad is destroyed.
3 years ago
Simon Zeni
0f3b38365d
types/wlr_switch: add base wlr_input_device
...
wlr_switch owns its wlr_input_device. It will be initialized when the
switch is initialized, and finished when the switch is destroyed.
3 years ago
Simon Zeni
d5480efc7a
types/wlr_pointer: add base wlr_input_device
...
wlr_pointer owns its wlr_input_device. It will be initialized when the
pointer is initialized, and finished when the pointer is destroyed.
3 years ago
Simon Zeni
a1978b1299
types/wlr_keyboard: add base wlr_input_device
...
wlr_keyboard owns its base wlr_input_device. It will be initialized when the
keyboard is initialized, and finished when the keyboard is destroyed.
3 years ago
Isaac Freund
252b2348bd
wlr_cursor: constify map to region box arguments
3 years ago
Kirill Primak
6ed3b02775
xdg-toplevel: fix `requested` doc
...
`requested` is also checked on state change requests.
3 years ago
Kirill Primak
34a71eae31
xdg-shell: drop wlr_xdg_toplevel_set_fullscreen_event
...
Instead, compositors can read relevant values from
wlr_xdg_toplevel.requested.
3 years ago
Kirill Primak
e59aa3e0e7
xdg-toplevel: change object type in event structs
...
This commit replaces wlr_xdg_toplevel_*_event::surface with a toplevel
field.
3 years ago
Kirill Primak
1e4c1a3b58
xdg-toplevel: change parent type to xdg-toplevel
...
This commit changes wlr_xdg_toplevel::parent type from wlr_xdg_surface
to wlr_xdg_toplevel.
3 years ago
Kirill Primak
70d4a30be3
xdg-shell: remove "xdg" from docs
3 years ago
Kirill Primak
41412cadbe
xdg-popup: fix functions' main argument type
...
With this commit, `wlr_xdg_popup_*()` functions now expect
a `wlr_xdg_popup` instead of a `wlr_xdg_surface`.
3 years ago
Kirill Primak
affe0d8713
xdg-toplevel: fix functions' main argument type
...
With this commit, `wlr_xdg_toplevel_*()` functions now expect
a `wlr_xdg_toplevel` instead of a `wlr_xdg_surface`.
3 years ago
Isaac Freund
9de992b9fe
ext-session-lock-v1: new protocol implementation
...
This implements the new ext-session-lock-v1 protocol [1].
[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/131
3 years ago