Age | Commit message (Collapse) | Author |
|
|
|
Testing with exporting WLR_BACKENDS=drm worked, and it wasn't documented. Checking the backends folder, and it also mentions an RDP backend as well
|
|
|
|
|
|
Some globals are static and it doesn't make sense to destroy them before
the wl_display. For instance, wl_compositor should be created before the
display is started and shouldn't be destroyed.
For these globals, we can simplify the code by removing the destructor
and stop keeping track of wl_resources (these will be destroyed with the
wl_display by libwayland).
|
|
Otherwise this error happens:
../subprojects/wlroots/render/wlr_texture.c: In function ‘wlr_texture_get_size’:
../subprojects/wlroots/render/wlr_texture.c:47:9: error: ISO C forbids ‘return’ with expression, in function returning void [-Werror=pedantic]
47 | return texture->impl->get_size(texture, width, height);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../subprojects/wlroots/render/wlr_texture.c:45:6: note: declared here
45 | void wlr_texture_get_size(struct wlr_texture *texture, int *width,
| ^~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
Most of the time, compositors just display the surface's current buffer
on an output. Add an helper to make it easy to support presentation-time
in this case.
|
|
The wlr_presentation_feedback struct now tracks presentation feedback
for multiple resources (but still a single surface content update). This
allows the compositor to properly send presentation events even when
there is more than one frame of latency or when it references a
surface's buffer.
|
|
Backends not supporting presentation feedback call
wlr_output_send_present with a NULL event in their commit handler. Since
the commit hasn't been applied yet, commit_seq still has its old value.
We need to increment it.
An alternative would be to move commit_seq in wlr_output_state. This
would allow to have a pending and a current commit_seq.
wlr_output_send_present could take the pending commit_seq when called
with a NULL event.
|
|
This allows listeners to read the commit sequence number.
|
|
$ screencopy
shm_open failed
failed to create buffer
$ posixshmcontrol ls
MODE OWNER GROUP SIZE PATH
--------- foo foo 33177600 /wlroots-screencopy
|
|
This requires functions without a prototype definition to be static.
This allows to detect dead code, export less symbols and put shared
functions in headers.
|
|
This reverts commit 3317134adff0ed179e0ecaea6d778dbd0684f771.
This reverts commit a3c3b928a3814f1a44babf487b1508415958c721.
There are some serious issues when running this on a real X server, as
opposed to running this on Xwayland, where this was tested.
More investigation needs to be done into why these issues happen and if
our usage of the present extension is correct.
|
|
Eliminates this warning when building wlroots as a subproject:
subprojects/wlroots/meson.build:216: DEPRECATION: Library wlroots
was passed to the libraries keyword argument of a previous call
to generate() method instead of first positional argument. Adding
wlroots to Requires field, but this is a deprecated behaviour
that will change in a future version of Meson. Please report the
issue if this warning cannot be avoided in your case.
|
|
We say 1.2, but I don't think we actually use anything that was
introduced past 1.0.
|
|
This can really mess with the session if logind is not being used,
and it's going to always fail anyway.
|
|
This is set to the value of wlr_output.commit_seq when the frame has
been submitted. This allows tracking presentation with more then 1 full
frame of latency.
References: https://github.com/swaywm/wlroots/issues/1917
|
|
Expose the remote wl_display, wl_surface and wl_seat used by the Wayland
backend.
This allows compositors to customize the Wayland backend and to have
more freedom. For instance a compositor might want to handle clipboard
and drag-and-drop from the remote Wayland compositor. Another compositor
might want to setup pointer constraints.
|
|
We just send relative motion events alongside absolute motion events.
Compositors can figure out how absolute and relative events are related
(e.g. whether they have been triggered by the same logical event) with
the frame event.
|
|
|
|
|
|
Prior to this commit, compositors needed to render the texture to an
intermediate off-screen buffer using wlr_renderer APIs if they wanted to
use a custom rendering path (e.g. render to a 3D scene).
A new wlr_gles2_texture_get_attribs exposes the GL texture target and ID
so that compositors can render wlr_textures with their own shaders. An
example of a compositor doing so is available at [1].
[1]: https://git.sr.ht/~sircmpwn/wxrc/tree/3db905b7842ac42cf1878876e647005b41f00a52/src/render.c#L227
|
|
|
|
We don't need our own enum for types. Instead we just use
GL_TEXTURE_{2D,EXTERNAL_OES}, which already describes usage.
Also fixes a situation where we were using GL_TEXTURE_2D in a situation
we should not have. wl_drm buffers are always GL_TEXTURE_EXTERNAL_OES,
no matter if they're RGB or any other format.
|
|
A wlr_keyboard_group allows for multiple keyboard devices to be
combined into one logical keyboard. Each keyboard device can only be
added to one keyboard group. This helps with the situation where one
physical keyboard is exposed as multiple keyboard devices. It is up to
the compositors on how they group keyboards together, if at all.
Since a wlr_keyboard_group is one logical keyboard, the keys are a set.
This means that if a key is pressed on multiple keyboard devices, the
key event will only be emitted once, but the internal state will count
the number of devices that the key is pressed on. Likewise, the key
release will not be emitted until the key is released from all devices.
If the compositor wants access to which keys are pressed and released
on each keyboard device, the events for those devices can be listened
to, as they currently are, in addition to the group keyboard's events.
Also, all keyboard devices in the group must share the same keymap. If
the keymap's differ, the keyboard device will not be able to be added
to the group. Once in the group, if the keymap or effective layout for
one keyboard device changes, it will be synced to all keyboard devices
in the group. The repeat info and keyboard modifiers are also synced
|
|
The original signal matching was using the old interface before
sd_bus_match_signal was added, which the new code uses.
Change them all to use it now.
|
|
|
|
Makes use of the present extension to get notified of vsync, and not
require any stupid timer hacks. Also make use of the present version of
ConfigureNotify, because why not?
|
|
See swaywm/sway#4660
|
|
Makes it easier to figure out when the compositor submits an invalid
output state.
References: https://github.com/swaywm/sway/pull/4673
|
|
Use the CVT algorithm to create a drmModeModeInfo.
|
|
On some Intel cards using modifiers can fill the FIFO and prevent
hotplugged outputs from being properly enabled.
Add a fallback without modifiers.
Fixes: 2bdd1d0896cc ("backend/drm: use modifiers for our GBM buffers")
References: https://github.com/swaywm/wlroots/issues/1840
Closes: https://github.com/swaywm/wlroots/issues/1852
|
|
|
|
We need to destroy the gbm_bo we imported and drmModeRmFb.
Closes: https://github.com/swaywm/sway/issues/4662
|
|
|
|
|
|
This allows synchronisation between different instances of commit/precommit
callbacks.
|
|
eglext.h no longer inludes eglmesaext.h, include it within wlroots
explicitly.
Fixes #1862
|
|
Fixes this warning:
../protocol/wlr-layer-shell-unstable-v1.xml:241: warning: since version not increasing
|
|
|
|
When a texture is destroyed between wlr_egl_make_current and
wlr_egl_swap_buffers, it resets the current EGL surface to NULL. This
makes wlr_egl_swap_buffers fail.
If the EGL context is already current, there's no need to reset it.
|
|
Closes: https://github.com/swaywm/wlroots/issues/1830
|
|
|
|
Define both MESA_EGL_NO_X11_HEADERS and EGL_NO_X11 for
backward combatibility.
|
|
|
|
If box->width/height is <= 0, the box doesn't contain any points, and so
there is no closest point. wlr_box_closest_point should return NAN in this
case.
In addition, we need to handle empty boxes in a few other
output-layout-related places, because outputs can have size 0x0 when
they are created or destroyed.
|