Age | Commit message (Collapse) | Author |
|
Groundwork for the following commits. The goal is to allow users
to specify their own wlr_output_state instead of wlr_output.pending.
|
|
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3434#note_1401193
Fixes: be86145322e6 ("output: turn make/model/serial into char *")
|
|
This allows the make/model/serial to be NULL when unset, and allows
them to be longer than the hardcoded array length.
This is a breaking change: compositors need to handle the new NULL
case, and we stop setting make/model to useless "headless" or
"wayland" strings.
|
|
|
|
The destroy callback in wlr_touch_impl has been removed. The function
`wlr_touch_finish` has been introduced to clean up the resources owned by a
wlr_touch.
`wlr_input_device_destroy` no longer destroys the wlr_touch, attempting to
destroy a wlr_touch will result in a no-op.
The field `name` has been added to the wlr_touch_impl to be able to identify
a given wlr_touch device.
|
|
The destroy callback in wlr_pointer_impl has been removed. The function
`wlr_pointer_finish` has been introduced to clean up the resources owned by a
wlr_pointer.
`wlr_input_device_destroy` no longer destroys the wlr_pointer, attempting to
destroy a wlr_pointer will result in a no-op.
The field `name` has been added to the wlr_pointer_impl to be able to identify
a given wlr_pointer device.
|
|
|
|
wlr_touch now owns its wlr_input_device. It will be initialized when the
tablet tool is initialized, and finished when the touch is destroyed.
|
|
wlr_pointer owns its wlr_input_device. It will be initialized when the
pointer is initialized, and finished when the pointer is destroyed.
|
|
vendor and product id are set when needed by the libinput backend
|
|
%zd is for ssize_t. For size_t we should use %zu.
|
|
wlroots picks names for all outputs, but it might be desirable for
compositor to override it.
For instance, Sway will use a headless output as a fallback in
case no outputs are connected. Sway wants to clearly label the
fallback output as such and label "real" headless outputs starting
from HEADLESS-1.
|
|
|
|
They are never used in practice, which makes all of our flag
handling effectively dead code. Also, APIs such as KMS don't
provide a good way to deal with the flags. Let's just fail the
DMA-BUF import when clients provide flags.
|
|
|
|
This is now unconditionally set to WLR_OUTPUT_STATE_BUFFER_SCANOUT.
|
|
Custom backends and renderers need to implement
wlr_backend_impl.get_buffer_caps and
wlr_renderer_impl.get_render_buffer_caps. They can't if enum
wlr_buffer_cap isn't made public.
|
|
Right now, when a new output state field is added, all backends by
default won't reject it. This means we need to add new checks to
each and every backend when we introduce a new state field.
Instead, introduce a bitmask of supported output state fields in
each backend, and error out if the user has submitted an unknown
field.
Some fields don't need any backend involvment to work. These are
listed in WLR_OUTPUT_STATE_BACKEND_OPTIONAL as a convenience.
|
|
|
|
Rely on wlr_output's generic swapchain handling.
We still need a renderer for cursor readback, sadly.
|
|
|
|
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.
|
|
|
|
We cannot scan-out DMA-BUFs with any flag right now.
|
|
We need to adjust the second translation depending on the transform
we applied.
Fixes: 9601a2abf024 ("output: improve transform matrix calculation"
Closes: https://github.com/swaywm/wlroots/issues/2774
|
|
Compute only the transform matrix in the output. The projection matrix
will be calculated inside the gles2 renderer when we start rendering.
The goal is to help the pixman rendering process.
|
|
When a new texture is set, the hotspot may actually belong to the
previous texture and be out of bounds. Rather than incur X errors for
these, clamp the hotspot to be inside of the texture.
This fixes weston examples updating their cursors (e.g.
weston-eventdemo).
|
|
|
|
|
|
Fixes #2659
|
|
The X11 backend uses the Present extension to schedule frames. The
refresh rate is unused.
|
|
When we receive an Expose event, that means that we must redraw that
region of the X11 window. Keep track of these regions with pixman
regions, and merge them with the additional output damaged regions.
Fixes #2670
|
|
This makes full-screen with weston-terminal work.
|
|
The transform matrix was all 0's, which meant that effectively nothing
got rendered other than the clear color.
|
|
The region variable was shadowed in an if block. As a result, in the
outer block region was always XCB_NONE and was never destroyed (causing
a memory leak on the server).
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
This actually simplifies the logic since we no longer have to wait for
enter/leave events, and also improves the UX when e.g. handling a crash
with gdb attached.
See #2659
|
|
Just in case.
|
|
Add fallbacks when DRI3 1.2 isn't supported.
Closes: https://github.com/swaywm/wlroots/issues/2586
|
|
Instead of requiring callers to manually make the EGL context current
before binding a buffer and unsetting it after unbinding a buffer, do
it inside wlr_renderer_bind_buffer.
This hides renderer-specific implementation details inside the
wlr_renderer interface. Non-GLES2 renderers may not use EGL.
This removes all EGL dependencies from the backends.
References: https://github.com/swaywm/wlroots/issues/2618
References: https://github.com/swaywm/wlroots/pull/2615#issuecomment-756687006
|
|
|
|
These aren't used anymore.
|
|
|
|
The Present protocol states:
> An event context is associated with a specific window; using an existing
> event context with a different window generates a Match error.
Instead of a global event context, use a per-window event context to fix
this error:
[backend/x11/backend.c:608] X11 error: op Present (SelectInput), code Match (no extension), sequence 63, value 4194307
Closes: https://github.com/swaywm/wlroots/issues/2577
|
|
Instead of using a timer, rely on X11 Present events and send a new
frame event when the parent compositor displays a new frame on screen.
The previous attempt at doing this [1] hit issues with EGLSurface, but
we don't use that anymore.
[1]: https://github.com/swaywm/wlroots/pull/1894
|
|
|
|
Instead of re-importing a buffer each time we submit a frame, re-use the
pixmaps if possible.
|
|
Instead of sending dummy output present events, use the X11 Present
extension to send more precise events.
|
|
Don't mix xinput and present flags.
Fixes: d79a00bf0208 ("backend/x11: switch to wlr_swapchain")
|
|
|