Age | Commit message (Collapse) | Author |
|
This will allow the DRM backend to reload its lessee list.
|
|
This change introduces new double buffered state to the wlr_output,
corresponding to the buffer format to render to.
The format being rendered to does not control the bit depth of colors
being sent to the display; it does generally determine the format with
which screenshot data is provided. The DRM backend _may_ sent higher
bit depths if the render format depth is increased, but hardware and
other limitations may apply.
|
|
This makes it possible for the two functions using output_pick_format
(output_pick_cursor_format and output_create_swapchain) to select
different buffer formats.
|
|
|
|
|
|
|
|
Co-authored-by: Simon Zeni <simon@bl4ckb0ne.ca>
|
|
A wlroots user can easily get confused and think that `cap` refers to
wlroots buffer capabilities, not array capacity.
|
|
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.
|
|
|
|
The protocol uses a signed integer here, which is also what the
wlr_input_method_v2_preedit_string struct provides to compositors from
the input method protocol. Sway currently just passes those int32_t
values directly to this function leading to an implicit conversion.
|
|
Callers can access output->front_buffer instead.
|
|
When a connector ID is specified in a hotplug event, don't scan all
connectors. Only scan the connector that has changed.
|
|
This struct contains additional information for session device
change events, such as the DRM connector ID that has changed.
|
|
This allows compositors to handle touch pointer emulation manually,
instead of having Xwayland do it [1].
[1]: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/691
|
|
|
|
The data field is useful to track metadata about a token. The destroy
events are useful for compositors that track application startup to
let them know they can stop doing that.
|
|
These new functions allow a compositor to request new managed tokens
without participating in the xdg-activation procedure as a wayland
client.
This enables the compositor itself to behave as a launcher
application.
|
|
The BO handle table exists to avoid double-closing a BO handle,
which aren't reference-counted by the kernel. But if we can
guarantee that there is only ever a single ref for each BO handle,
then we don't need the BO handle table anymore.
This is possible if we create the handle right before the ADDFB2
IOCTL, and close the handle right after. The handles are very
short-lived and we don't need to track their lifetime.
Because of multi-planar FBs, we need to be a bit careful: some
FB planes might share the same handle. But with a small check, it's
easy to avoid double-closing the same handle (which wouldn't be a
big deal anyways).
There's one gotcha though: drmModeSetCursor2 takes a BO handle as
input. Saving the handles until drmModeSetCursor2 time would require
us to track BO handle lifetimes, so we wouldn't be able to get rid
of the BO handle table. As a workaround, use drmModeGetFB to turn the
FB ID back to a BO handle, call drmModeSetCursor2 and then immediately
close the BO handle. The overhead should be minimal since these IOCTLs
are pretty cheap.
Closes: https://github.com/swaywm/wlroots/issues/3164
|
|
This organizes the wlr_output implementation into separate files.
This avoids having a single mega-file with lots of unrelated parts
and makes it more obvious what the interactions between all the
parts are.
No functional changes, just moving code around.
|
|
Check if only a single node intersects with the output viewport
and all of its properties match. In this case, attempt direct
scan-out.
|
|
This allows compositors to more easily implement sending
wl_surface.frame callback done events.
|
|
|
|
|
|
This new renderer is implemented with the existing wlr_renderer API
(which is known to be sub-optimal for some operations). It's not
used by default, but users can opt-in by setting WLR_RENDERER=vulkan.
The renderer depends on VK_EXT_image_drm_format_modifier and
VK_EXT_physical_device_drm.
Co-authored-by: Simon Ser <contact@emersion.fr>
Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
|
|
|
|
These are very common operations for compositors (including tinywl)
to perform.
|
|
Currently these functions remove the node from the scene if the sibling
argument is the same node as the node. To prevent confusion when
misusing this API, assert that the nodes are distinct and document this.
|
|
The same logic/motivation as xdg-toplevel.
|
|
|
|
These functions are used mostly for rendering, where including unmapped
surfaces is undesired.
This is a breaking change. However, few to no usages will have to be
updated.
|
|
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
|
|
This reverts commit 833437d5921339f2862ccfb0493617630ea3937d.
|
|
|
|
Rename it to scheduled_serial for consistency with the rest of
wlroots.
|
|
This holds the current state, and avoids having ad-hoc fields in
wlr_xdg_surface.
|
|
struct wlr_xdg_surface_state is introduced to hold the geometry
and configure serial to be applied on next wl_surface.commit.
This commit fixes our handling for ack_configure: instead of making
the request mutate our current state, it mutates the pending state
only.
Co-authored-by: Simon Ser <contact@emersion.fr>
|
|
Update the pointer gestures protocol to version 3 allowing to send hold
gestures to clients.
|
|
Recevie the hold gesture events from the libinput or Wayland backends,
abstracted as pointer signals, and re-emit them from the cursor
interface.
|
|
Receive hold gesture events using a Wayland listiner and emit the
appropiate wlr_pointer signal.
|
|
Receive hold gesture events from libinput and emit the appropiate
wlr_pointer signal.
|
|
As touchpad touches are generally fully abstracted, a client cannot
currently know when a user is interacting with the touchpad without
moving. This is solved by hold gestures.
Hold gestures are notifications about one or more fingers being held
down on the touchpad without significant movement.
Hold gestures are primarily designed for two interactions:
- Hold to interact: where a hold gesture is active for some time a
menu could pop up, some object could be selected, etc.
- Hold to cancel: where e.g. kinetic scrolling is currently active,
the start of a hold gesture can be used to stop the scroll.
Unlike swipe and pinch, hold gestures, by definition, do not have
movement, so there is no need for an "update" stage in the gesture.
Create two structs, wlr_event_pointer_hold_begin and
wlr_event_pointer_hold_end, to represent hold gesture events and the
signals to emit them: wlr_pointer->pointer.hold_begin/hold_end.
|
|
|
|
Same logic as xdg-toplevel.
|
|
|
|
|
|
|
|
Same as wlr_box_empty, but for wlr_fbox.
|
|
This new scene-graph node displays a wlr_buffer.
Closes: https://github.com/swaywm/wlroots/issues/3161
|
|
|