Simon Zeni
b899a412e3
backend: remove wlr_egl from all backends
4 years ago
Andri Yngvason
e136a4168b
types/seat: Clear focus in wlr_seat_destroy()
...
This fixes use-after-free in surface destroy signal listeners.
4 years ago
Simon Ser
07d75c99db
render: remove EGL config and visual from wlr_renderer_autocreate
...
This isn't used anymore by any backend.
Some examples still provide an EGL config to wlr_egl_init, so we can't
drop it yet there.
4 years ago
Ilia Bozhinov
01dcfb360e
types: add wlr_xdg_foreign_v2
...
Co-authored-by: Jason Francis <cycl0ps@tuta.io>
4 years ago
Ilia Bozhinov
162f160def
types: add wlr_xdg_foreign_v1
...
Co-authored-by: Jason Francis <cycl0ps@tuta.io>
4 years ago
Ilia Bozhinov
37602e153b
types: add wlr_xdg_foreign_registry
4 years ago
Ilia Bozhinov
42d033e738
xdg-shell: add wlr_xdg_toplevel_set_parent
...
Co-authored-by: Jason Francis <cycl0ps@tuta.io>
4 years ago
Isaac Freund
83fdfa511d
docs: wlr_surface_from_resource cannot return NULL
...
Surfaces never become inert.
4 years ago
Simon Ser
e8d56ca415
backend/session: allow wlr_session_find_gpus to return an error
...
Sometimes wlr_session_find_gpus will encounter an error. This is
different from finding zero GPUs.
On error, wlr_session_find_gpus already returns -1. However, this is
casted to size_t, so callers uncorrectly assume this is a success.
Instead, make wlr_session_find_gpus return a ssize_t and allow callers
to handle the error accordingly.
4 years ago
Simon Ser
4b03bdc3ab
Remove wlr_create_renderer_func_t
...
This callback allowed compositors to customize the EGL config used by
the renderer. However with renderer v6 EGL configs aren't used anymore.
Instead, buffers are allocated via GBM and GL FBOs are rendered to. So
customizing the EGL config is a no-op.
4 years ago
Isaac Freund
f6fc4c2883
subsurface: handle NULL parent in get_root_surface
4 years ago
Isaac Freund
c9760569ae
docs: fix error in wlr_output_set_damage() comment
...
output-buffer-local coordinates are neither scaled nor transformed
4 years ago
Dominik Honnef
431ec52b9c
xwayland: use pipe instead of SIGUSR1 to signal readiness
...
Closes: https://github.com/swaywm/wlroots/issues/2154
4 years ago
Simon Ser
513eca8dab
build: add leftover WLR_HAS_LIBCAP
...
We don't support libcap anymore. This was left as a comment by Meson:
/* #undef WLR_HAS_LIBCAP */
4 years ago
Ilia Bozhinov
d2329ac07a
xwm: add wlr_xwayland_surface_restack()
4 years ago
Simon Ser
83a5d03bf3
render/egl: remove wlr_egl.external_only_dmabuf_formats
...
Replace it with wlr_egl.dmabuf_render_formats.
4 years ago
Simon Ser
c94ab99ae2
render: rename wlr_renderer_get_formats
...
Rename wlr_renderer_get_formats to wlr_renderer_get_shm_texture_formats.
This makes it clear those formats are only suitable for shm import.
4 years ago
Simon Ser
49115e9d5d
render: rename wlr_renderer_get_dmabuf_formats
...
Rename wlr_renderer_get_dmabuf_formats to
wlr_renderer_get_dmabuf_texture_formats. This makes it clear the formats
are only suitable for creating wlr_textures.
4 years ago
Simon Ser
5d008d9030
render: introduce wlr_renderer_get_dmabuf_render_formats
...
It describes which DMA-BUF formats can be used to render.
4 years ago
Simon Ser
61612ecb36
render: remove wlr_renderer_format_supported
...
Instead, callers can just use wlr_renderer_get_formats and iterate over
the list.
This function was unused in wlroots.
4 years ago
Simon Ser
c15ca3793e
render: expand wlr_renderer_get{,_dmabuf}_formats docs
...
Make it clear formats returned are only suitable for import/sampling.
These formats can't be used to be rendered to.
4 years ago
Kenny Levinsen
ebecc5404b
surface: Make send_enter store entered outputs
...
wlr_surface_send_enter now stores outputs that have been entered.
Combined with a new 'bind' event on wlr_output, this allows us to delay
enter events as necessary until the respective wl_output global has been
bound.
Closes: https://github.com/swaywm/wlroots/issues/2466
4 years ago
Simon Ser
0e76f92de7
backend/session: replace session_signal with events.active
...
This is more idiomatic wlroots API. The new name makes it clear that the
signal is emitted when wlr_session.active changes.
4 years ago
Simon Ser
fbf11a41e1
backend/session: wait for DRM device if none found
...
Wait for a DRM device if none is found in wlr_session_find_gpus. This
can happen if the compositor is loaded before the display kernel driver.
This supersedes the logind CanGraphical property.
To test, e.g. with i915 and sway:
rmmod -f i915
sway &
modprobe i915
Closes: https://github.com/swaywm/wlroots/issues/2093
4 years ago
Simon Ser
76bcddf071
backend/session: introduce wlr_session.events.add_drm_card
...
This is triggered when a new DRM card is added.
An easy way to test this patch is `modprobe vkms`.
4 years ago
Simon Ser
44a4792fd8
backend/session: operate on wlr_device
...
Instead of operating on FDs in {open,close}_device, operate on
wlr_devices. This avoids the device lookup in wlr_session and allows
callers to have access to wlr_device fields.
For now, we use it to remove wlr_session_signal_add and replace it with
a more idiomatic wlr_session.events.change field. In the future, other
events will be added.
4 years ago
Ilia Bozhinov
6284af121f
texture: document that functions should not be called while rendering
4 years ago
Simon Ser
e18599b05e
render/egl: stop including eglmesaext.h
...
This is a Mesa-specific header that was needed because some Wayland EGL
extensions were missing from the Khronos registry. Now that this has
been fixed [1] and Mesa [2] & glvnd [3] have sync'ed their headers, we
can drop this workaround.
[1]: https://github.com/KhronosGroup/EGL-Registry/pull/95
[2]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4953
[3]: https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/225
4 years ago
Simon Ser
eb8360bda3
render: introduce wlr_renderer_get_drm_fd
4 years ago
Simon Ser
c8d95acc37
render/egl: introduce wlr_egl_dup_drm_fd
4 years ago
Simon Ser
c88c54fb38
render: introduce wlr_renderer_bind_buffer
4 years ago
Simon Ser
0b40d09a21
buffer: add wlr_client_buffer_get
4 years ago
Isaac Freund
e06c9e43af
Remove unneeded includes from wlr_input_device.h
...
This uncovered many places where we were using things without directly
including them.
4 years ago
Isaac Freund
0724b3c453
Use uint32_t in wlr_renderer_begin signature
...
This matches the signature of wlr_renderer_impl.begin
4 years ago
Isaac Freund
7693f61d81
Replace wlr_key_state with wl_keyboard_key_state
...
There's no reason to have duplicate enums
4 years ago
Isaac Freund
8348fc3ef8
xwayland: remove unused listener
4 years ago
Simon Ser
51fc7ddb29
screencopy: perform DMA-BUF copy on output commit
4 years ago
Simon Ser
f0945e112f
export-dmabuf: export DMA-BUF on output commit
...
We were previously exporting DMA-BUFs when receiving the capture_output
request, and sending a done event on wlr_output.events.precommit. Instead,
export and send done on wlr_output.events.commit.
4 years ago
Simon Ser
8c8164c4a6
output: add when field to wlr_output_event_commit
...
Similar to the one already present in wlr_output_event_precommit.
4 years ago
Simon Ser
ccd313e01a
output: update docs to reflect reality
...
The docs were outdated and weren't matching what the DRM backend does
(the only implementor of wlr_output_export_dmabuf).
4 years ago
Simon Ser
c2db691cad
gamma-control-v1: apply gamma LUT when output gets enabled
...
Closes: https://github.com/swaywm/wlroots/issues/2372
4 years ago
Simon Ser
f0ddcd361e
render: define EGL_NO_PLATFORM_SPECIFIC_TYPES ( #2452 )
...
This avoids Xlib.h inclusion via EGL headers. See [1] for discussion.
This change is based on a Weston commit [2].
[1]: https://github.com/KhronosGroup/EGL-Registry/pull/111
[2]: https://gitlab.freedesktop.org/wayland/weston/commit/526765ddfdfd
4 years ago
Tudor Brindus
0f9b2bfa64
render/dmabuf: use bitmask for wlr_dmabuf_attributes_flags
4 years ago
Tudor Brindus
368d0146fb
util/edges: use bitmask for wlr_edges
4 years ago
Tudor Brindus
0fdb41fe7c
types/wlr_output_layout: use bitmask for wlr_direction
4 years ago
Tudor Brindus
7c6e06fd13
types/wlr_keyboard: use bitmasks for wlr_keyboard_led and wlr_keyboard_modifier enums
4 years ago
Daniel Kondor
36395e5b1c
foreign-toplevel-management: report parent toplevel
...
Based on the wlr-protocols PR:
https://github.com/swaywm/wlr-protocols/pull/52
4 years ago
Isaac Freund
e410ff8dd4
wlr_drag: remove unused point_destroy field
4 years ago
Isaac Freund
616f06c25c
xdg_positioner: remove unused field
...
The resource field of wlr_xdg_positioner is never initialized or
accessed within wlroots. The wl_resource for this interface is stored
in the wlr_xdg_positioner_resource struct.
4 years ago
Ilia Bozhinov
99f3c643bf
xwayland: add set_geometry event
...
This is necessary to react to changes in position of override-redirect
views.
4 years ago