Age | Commit message (Collapse) | Author |
|
|
|
|
|
We can just assume CLOCK_MONOTONIC everywhere.
Simplifies the backend API, and fixes clock mismatches when multiple
backends are used together with different clocks.
|
|
|
|
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.
|
|
By using this function, a compositor can display a wlroots
compositor in a sub-surface, for instance.
|
|
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().
|
|
This allows compositors to use an existing wl_display, to integrate
wlroots with an existing toolkit.
|
|
Use the viewporter protocol to scale output layers.
|
|
|
|
since wayland doesn't provide a touch id in cancel events, track what
points are active so we can cancel all of them
timestamp is also not provided - use 0 because no one's paying attention
to that anyway
Closes #3000
|
|
|
|
Destroy the struct wlr_wl_seat when the global is removed.
|
|
Instead of destroying all seats, destroy a single one. We only need
to destroy all seats at one call-site (backend_destroy), but we'll
need to destroy a single seat elsewhere in the next commit.
|
|
The output names must be globally unique per the Wayland spec, even
if the compositor creates multiple backends of the same kind.
|
|
We were firing the new_input signal on backend initialization,
before the compositor had the chance to add a listener for it.
Mimick what's done for wl_keyboard: if the backend hasn't been
started, delay wl_touch initialization.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3473
|
|
|
|
|
|
|
|
|
|
All the code logic related to the pointer has been moved to its own file.
The seat is responsible for the lifetime of its wlr_wl_pointer(s), and assigning
them to the relevant wlr_wl_output. The wlr_wl_pointer becomes a simple helper
to manager the wlr_pointer associated to the seat's wl_pointer and its lifetime.
|
|
|
|
|
|
This field's ownership is unclear: it's in wlr_input_device, but
it's not managed by the common code, it's up to each individual
backend to use it and clean it up.
Since this is a backend implementation detail, move it to the
backend-specific structs.
|
|
There's no guarantee that the parent Wayland compositor uses
CLOCK_MONOTONIC for reporting presentation timestamps, they could
be using e.g. CLOCK_MONOTONIC_RAW or another system-specific clock.
Forward the value via wlr_backend_impl.get_presentation_clock.
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3254#note_1143061
|
|
|
|
Receive hold gesture events using a Wayland listiner and emit the
appropiate wlr_pointer signal.
|
|
|
|
Rely on wlr_output's generic swapchain handling.
|
|
Instead of passing a wlr_texture to the backend, directly pass a
wlr_buffer. Use get_cursor_size and get_cursor_formats to create
a wlr_buffer that can be used as a cursor.
We don't want to pass a wlr_texture because we want to remove as
many rendering bits from the backend as possible.
|
|
Instead of managing our own renderer and allocator, let the common
code do it.
|
|
|
|
|
|
Just like other backends, use the EGL GBM platform. This will make it
easier to move the allocator and renderer initialization out of the
backends.
|
|
|
|
|
|
Instead of re-importing a buffer each time we submit a new frame, re-use
the wl_buffer objects if possible.
|
|
|
|
The cursor surface still uses a wl_egl_window.
References: https://github.com/swaywm/wlroots/issues/1352
|
|
|
|
Every host seat with pointer capability propagates events to one of
sub-pointer depending which output window we entered.
active_pointer tracks reference to sub-pointer on enter/leave events to
avoid lookup for it on every move events.
Fixes swaywm/wlroots#1499
|
|
|
|
|
|
|
|
This uncovered many places where we were using things without directly
including them.
|
|
|
|
|
|
Goal currently is to get support working for a single output, thus there is only one touch device created.
Multi-output support is left for later.
|
|
Check that buffer can be scanned out in wlr_output_test instead of
wlr_output_attach_buffer. This allows the backend to have access to the
whole pending state when performing the check.
This brings the wlr_output API more in line with the KMS API.
This removes the need for wlr_output_attach_buffer to return a value,
and for wlr_output_impl.attach_buffer.
|
|
Previously, we just assumed submitting a new frame would make the
compositor release the current one. This isn't always the case, for
instance Sway retains old buffers when a transaction is pending. This
resulted in synchronization issues with clients writing in
front-buffers.
Fix this by un-referencing a wlr_buffer when the parent compositor sends
wl_buffer.release.
Tested by running a fullscreen mpv instance in Sway with the Wayland
backend.
|