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
Isaac Freund
8ad2cc39eb
layer-shell: add for_each_popup
...
This brings the layer-shell api in line with that of xdg-shell and
avoids reimplementing this function in every compositor in order to
render layer shell popups correctly.
4 years ago
Drew DeVault
a9cbfd950e
Remove xdg-shell v6
...
Ding dong the witch is dead
Fixes #2381
4 years ago
Simon Ser
b0144c7ded
output-power-management-v1: listen to output commit
4 years ago
Simon Ser
c674241ec0
output: introduce wlr_output_event_commit
...
This event contains a `committed` bitfield, which allows callers to know
which output fields changed during the commit.
This allows users to setup a single atomic commit listener, instead of
setting up one listener for each event (mode, scale, transform, and so
on).
References: https://github.com/swaywm/wlroots/issues/2098
4 years ago
Isaac Freund
2072d59da5
xdg-shell: split last-acked and current state
...
These states are distinct in the time period between the ack_configure
and the next commit on the surface. Splitting these states avoids the
following race for example:
- client starts at 1000x1000
- wlr_xdg_toplevel_set_size 500x500
- size is different -> configure sent
- client acks the configure
- wlr_xdg_toplevel_set_size 1000x1000
- compare_xdg_toplevel_state returns true since there is no pending
configure and the currently committed size is still 1000x1000
- no new configure is sent
- client commits at the size it last acked, 500x500
4 years ago
Kenny Levinsen
bad1e9afa8
session: Add libseat backend
4 years ago
Simon Ser
26af316b3b
render/gles2: make wlr_gles2_texture_from_* private
...
These functions are unused by compositors (see e.g. [1]) and prevent
wlr_gles2_texture from accessing wlr_gles2_renderer state. This is an
issue for proper teardown [2] and for accessing GLES2 extensions.
[1]: https://github.com/swaywm/wlroots/pull/1962#issuecomment-569511830
[2]: https://github.com/swaywm/wlroots/pull/1962
4 years ago
Tobias Langendorf
bd387da62d
xwm: add support for xwayland minimize
4 years ago
Tudor Brindus
a145430afa
input/pointer: add wlr_seat_pointer_wrap
...
It allows a compositor to do things like skip motion events on pointer
constraint unlock.
References: https://github.com/swaywm/sway/pull/5431
4 years ago
xdavidwu
595f324f8b
input-method: implement keyboard grabs
4 years ago
xdavidwu
61e2ebac90
virtual-keyboard: add wlr_input_device_get_virtual_keyboard
4 years ago
Isaac Freund
92c85858a9
layer-shell: remove unused surface list
...
This was rendered useless in 5cde359
.
4 years ago
Simon Ser
c611a8f7e7
output: add backend docs
4 years ago
Simon Ser
bf93d2e67c
output: rename impl->rollback to rollback_render
...
The output backend API is now mostly state-less thanks to the atomic
hooks (commit and test). There is one exception though: attach_render.
This function makes the rendering context current. However sometimes the
compositor might decide not to render after attach_render (e.g. when
there's nothing new to render to the back buffer). Thus
wlr_output_rollback has been introduced to revert the pending state.
Because the output backend API is mostly state-less, the only thing
wlr_output_impl.rollback needs to do is revert the current rendering
context. Rename the function to rollback_render to make this clear. Add
a check in the common wlr_output code to only call rollback_render when
attach_buffer has been previously called.
On the long term, we'll be able to remove attach_render and
rollback_render together.
5 years ago
Simon Ser
9e68ed2159
viewporter: new protocol implementation
...
Closes: https://github.com/swaywm/wlroots/issues/633
5 years ago
Simon Ser
c618a76540
surface: introduce wlr_surface_get_buffer_source_box
...
This helper allows compositors to retrieve the buffer source box in
buffer-local coordinates.
5 years ago
Simon Ser
eb22ae97b0
surface: add wlr_surface_state.viewport
...
This field contains the viewport source and destination parameters. It's
intended to be updated by a third-party protocol, for instance
viewporter.
5 years ago
Simon Ser
315bf08733
render: add wlr_render_subtexture_with_matrix
...
This renders only a subset of the texture, instead of the full texture.
5 years ago
Simon Ser
00ccb89288
util/region: add wlr_region_scale_xy
5 years ago
Simon Ser
9814213a91
box: add wlr_fbox
...
Same as wlr_box, but for floating-point numbers.
5 years ago
Simon Ser
79e03c7d45
output: document wlr_output_export_dmabuf
5 years ago
Simon Ser
a8a4a12c4b
buffer: document wlr_buffer_get_dmabuf DMA-BUF lifetime
5 years ago
Andri Yngvason
ea83957ecc
screencopy: Implement copying into linux-dmabuf
5 years ago
Andri Yngvason
b64a8a7f98
render: Add wlr_renderer_blit_dmabuf()
5 years ago
Andri Yngvason
11b598fe33
render: egl: Add utility functions for saving/restoring context
5 years ago
Simon Ser
a3ba82885c
render: choose DMA-BUF texture target via eglQueryDmaBufModifiersEXT
...
EGL_EXT_image_dma_buf_import_modifiers tells us whether we should use
GL_TEXTURE_2D or GL_TEXTURE_EXTERNAL_OES. Using the right texture target
can fix some failures and/or improve performance on some drivers.
This does the same as a Weston commit [1].
[1]: https://gitlab.freedesktop.org/wayland/weston/commit/40c519a3e613
Closes: https://github.com/swaywm/wlroots/issues/2173
5 years ago