Simon Ser
11aba53ead
render: only open DRM render node if necessary
...
Only open a render node if we actually need one (ie, if we're about
to attempt GLES2 or Vulkan).
1 year ago
Rose Hudson
f5917f0247
scene_output_layout: make output adding explicit
...
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3709
1 year ago
Rose Hudson
91f813ffb7
output_layout: return wlr_output_layout_output when adding output
...
This will be used for the scene-graph integration.
1 year ago
Alexander Orzechowski
e85c79051c
wlr_output: Set current_mode during new custom mode
...
When setting a custom mode current_mode will not be reset. That means
that next time the compositor tries to reset back from the custom mode,
it will compare against the stale current_mode and unset
WLR_OUTPUT_STATE_MODE erroneously.
1 year ago
Simon Ser
72787db98a
compositor: drop wlr_surface_destroy_role_object()
...
This function is now unnecessary.
1 year ago
Kirill Primak
bd5c4f4a4a
xdg-shell: rework roles
1 year ago
Kirill Primak
e5300c225e
xdg-popup: avoid using wlr_surface_destroy_role_object()
1 year ago
Kirill Primak
10ba8ebc70
Don't assume xdg_surface.{toplevel,popup} is non-NULL
...
This assumption will become incorrect with future commits.
1 year ago
Kirill Primak
f0cc712af1
xdg-shell: don't return anything from create_xdg_surface()
1 year ago
Alexander Orzechowski
ce615a44c0
egl: Don't assume display is owned when KHR_display_reference is unsupported
...
We could potentially leak a display here, but not really because the
display acts as a singleton that will be returned next time a renderer
of the same device is created.
1 year ago
Alexander Orzechowski
91a1797a96
egl: Remove dead code
...
Display is always NULL here since egl_init is always last to be called.
1 year ago
Simon Ser
9b8cd1f5d6
buffer: make wlr_client_buffer functions private
...
We want to eventually remove this. Let's make sure compositors
don't start using either of these functions.
1 year ago
Simon Ser
6c1a2a6657
backend/headless: fix broken output frame events
...
frame_delay was set to 0.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3712
1 year ago
Alexander Orzechowski
5f6912595e
renderer/vulkan: Defer device lost signal until end of pass
...
If the compositor were to try to handle a GPU reset within the lost
signal (by recreating the renderer) we should avoid referencing renderer
resources after the lost signal. This prevents use after free for such
compositors.
1 year ago
Leonardo Hernández Hernández
bdc34401ba
xdg-decoration: store an xdg_toplevel instead of xdg_surface
...
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3685
1 year ago
Simon Ser
22b6581a18
backend/wayland: wait for xdg_surface.configure explicitly
...
We were assuming a roundtrip was enough to get an
xdg_surface.configure event. That's not the case, the protocol
spec doesn't make such a guarantee.
1 year ago
Simon Ser
d3d3e19ffd
render: split render pass API into separate header
...
Keeps the main wlr_renderer.h a tad more tidy.
1 year ago
Alexander Orzechowski
568b1943b9
wlr_output: Nuke wlr_output_update_enabled
1 year ago
Alexander Orzechowski
63351cf81f
output: Schedule mode updates to happen with rest of output events
1 year ago
Alexander Orzechowski
f042de3f51
output: Inline wlr_output_update_{custom,}_mode
1 year ago
Alexander Orzechowski
f1ba70ffa6
wlr_output: Make wlr_output_update_{custom,}_mode private
...
Backends should be using wlr_output_send_request_state to request
modesets to the compositor. This will be inlined and removed next commit.
1 year ago
Alexander Orzechowski
8f0d4c9332
backend/drm: Use output state to set init mode
1 year ago
Alexander Orzechowski
a34d349963
backend/drm: Move output variable up in connect_drm_connector
1 year ago
Alexander Orzechowski
a60361050e
backend/headless: Use output state to set init custom mode
1 year ago
Alexander Orzechowski
83d9764ed8
backend/wayland: Use output state to set init custom mode
1 year ago
Alexander Orzechowski
869b0f14bc
backend/x11: Use output state to set init custom mode
1 year ago
Alexander Orzechowski
6cda3e251c
output: Add initialization state to wlr_output_init
1 year ago
Alexander Orzechowski
8f67446cc7
output: Extract common commit logic
1 year ago
Simon Ser
8836e12988
examples/embedded: new example
1 year ago
Simon Ser
8678633fc9
backend/wayland: add wlr_wl_output_create_from_surface()
...
By using this function, a compositor can display a wlroots
compositor in a sub-surface, for instance.
1 year ago
Simon Ser
4f88886199
backend/wayland: tag wl_surface
...
When integrating wlroots with another toolkit, wlroots may receive
wl_pointer.enter events for surfaces not backed by a wlr_output.
Ignore such surfaces by tagging the ones we're aware of with
wl_proxy_set_tag().
1 year ago
Simon Ser
dd24991c9e
backend/wayland: take existing wl_display in wlr_wl_backend_create()
...
This allows compositors to use an existing wl_display, to integrate
wlroots with an existing toolkit.
1 year ago
Alexander Orzechowski
664ec59095
renderer: Sanity check texture source bounds
1 year ago
Alexander Orzechowski
aee31edaad
screencopy_v1: Implement copy regions with gpu blit path
1 year ago
Alexander Orzechowski
b4cbaa4549
screencopy_v1: Use new renderer API for gpu blit path
1 year ago
Simon Ser
c74f89d4f8
Avoid using memcpy() to copy structs
...
We can just use a regular assignment instead. This is more
type-safe since there is no need to provide the struct size.
The remaining memcpy() calls perform array copies or copies from
void pointers (which may be unaligned).
1 year ago
Simon Ser
77dc1c28aa
xwayland: drop wlr_xwayland_surface.events.set_pid
...
The PID of an X11 window cannot change.
This is a remnant from the days when we queried the PID with a
window property, instead of using XRes.
1 year ago
JiDe Zhang
73db481037
wlr_output: update cursor when scale changed
...
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3699
1 year ago
JiDe Zhang
61903ed66b
wlr_output_cursor: assert renderer isn't NULL
...
When a wlr_output add to wlr_output_layout, wlr_cursor will create
wlr_buffer of xcursor for the wlr_output, this behavior depends
wlr_renderer of wlr_output, using assert to ensure renderer is
initialized before wlr_output_layout_add and wlr_cursor_set_buffer/
wlr_cursor_set_xcursor.
1 year ago
Simon Ser
d40bcfe2c1
xwayland: avoid calling xwm_get_atom_name() when debug logs are off
...
xwm_get_atom_name() performs a roundtrip to the X11 server. Avoid
calling this blocking function if debug logs are turned off.
1 year ago
Simon Zeni
60ca6f17eb
types/wlr_drm_lease_v1: downgrade DRM backend error message to debug
...
Downgrades the error message printed out when no DRM backend is given from `WLR_ERROR` to
`WLR_DEBUG`
1 year ago
q234rty
061f5fafbd
render/vulkan: use renamed glslang binary by default
...
glslang 12.3.0 renamed glslangValidator to glslang,
use that by default and use the old name as a fallback.
References: https://github.com/KhronosGroup/glslang/blob/main/CHANGES.md?plain=1#L14
1 year ago
Kirill Primak
42a5b6f62a
compositor: add "mapped" flag doc
1 year ago
Kirill Primak
7df11ada5e
Unmap wlr_surface before making its role object inert
1 year ago
Kirill Primak
529f1b82ee
xwayland/shell: don't listen to wlr_surface.events.destroy
...
The wlr_xwayland_surface_v1 will be destroyed automatically
from xwl_surface_role_destroy().
1 year ago
Simon Ser
307720d501
backend/drm: restore custom modes
...
We were only restoring fixed modes here. The DRM backend no longer
creates fixed modes when the compositor sets a custom mode, so we
need to handle this situation when restoring.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3698
1 year ago
rewine
2f859f5bec
wlr_output: add comments for signal parameters
1 year ago
Leonardo Hernández Hernández
e8d545a977
xdg-shell: add support for v6
...
This adds the suspended toplevel state
1 year ago
Simon Ser
04e4e06986
cursor-shape-v1: new protocol implementation
...
References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/194
1 year ago
Alexander Orzechowski
fd540f6d07
wlr_scene: Don't damage when setting opaque region
...
Opaque region is a optimization hint, (bugs outstanding) it will not
change the output contents, therefore damage does not need to be submitted.
However, we still need to update the visibility state of the other
nodes in the tree. To do this call scene_update_region() by ourselves
but not `scene_node_update()` which will damage the outputs.
1 year ago