Make toplevels attached to an xdg-toplevel-drag automatically float, and
position them at the cursor when first mapped.
This enables the typical tab tear-off workflow:
1. User starts dragging a tab in a browser
2. Browser creates a new toplevel attached to the drag
3. Sway floats the toplevel and positions it at the cursor
4. The motion handler (from previous commit) keeps it moving with cursor
Add support for tracking xdg-toplevel-drag operations and moving the
attached container during drag motion events.
Implementation detail:
- Track the dragged surface ourselves rather than trusting wlroots'
toplevel pointer, which may not be NULLed promptly during destruction.
This mirrors Mutter's approach with dragged_surface.
- Use find_xdg_view_with_toplevel_drag() which searches through sway's
views and uses wlroots' wlr_xdg_toplevel_drag_v1_from_wlr_xdg_toplevel()
for safe comparison, avoiding stale pointer access. There could be a
better way to do this.
- Account for XDG surface geometry offset when positioning the container.
- Add container_floating_update_scene_position() helper that updates the
scene graph position immediately, bypassing the transaction system's
batching for smoother visual feedback during drag operations.
- Clean up container tracking in seatop_unref when container is destroyed.
Add the xdg-toplevel-drag-v1 protocol manager to the server. This
protocol allows clients to attach a toplevel window to an ongoing
drag-and-drop operation, enabling features like browser tab tear-off.
Update the information about display manager support (see #8861), as
well as markdown formatting of links and change some wording in the
German README.
Updated italian readme to follow the recent changes to the English one.
I also removed "gestore di accesso" which in theory translates to
display manager, but in practice is never used in this context. Other
wikis such as [Debian](https://wiki.debian.org/it/DisplayManager) and
[Ubuntu](https://wiki.ubuntu-it.org/AmbienteGrafico/DisplayManager) just
use the term "Display Manager" as is. Another small thing that I
corrected is "canale di IRC" which sounds a bit weird.
It's been a long while since we've heard about issues related to
display managers. Some used to be unreliable in the past, but by
now most issues have been ironed out. Let's start supporting them
officially.
I've considered translating other languages but I'm concerned about
messing up the sentence. I've updated languages I'm comfortable
with.
Previously it was reporting window_menu and maximize instead of fullscreen because wlr_xdg_toplevel_set_wm_capabilities expects a bitmask (WLR_XDG_TOPLEVEL_WM_CAPABILITIES_*), and XDG_TOPLEVEL_WM_CAPABILITIES_* are supposed to be used as values in wl_array, so the values are different:
XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN = 3
WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN = 4
We currently emit errors about HDR support even if HDR is not being
requested, which mean errors on every regular modeset when monitors not
supporting HDR are connected.
Only emit errors when attempting to enable HDR on such device.
Fixes a compatibility issue with i3 where resizing works as described
hereafter:
> Direction can either be one of up, down, left or right. Or you can be
> less specific and use width or height, in which case i3 will take/give
> space from all the other containers.
Sway previously considered only the direct neighbours, not all siblings.
Fixes#5936
Applying layout changes to the parent of the parent, in case the parent only has a single child, stops the creation of a chain of single child containers.
Closes: https://github.com/swaywm/sway/issues/7945
Node destruction currently runs through the transaction system such that
a particular node is only destroyed after its use in an ongoing
transaction. If a node is dirtied after the node is marked as destroying
but before it is destroyed, the pointer added to dirty_nodes would
become a dangling pointer once the node was destroyed.
Do not dirty destroying nodes, and ensure that destroying is only set
after the last dirty.
I misunderstood the recommendation in the libinput release notes.
Instead of making enabled_sticky the default, leave the default
set to disabled.
Fixes: bbadf9b8b1 ("Add support for LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY")
Closes: https://github.com/swaywm/sway/issues/8758
In general wl_signal isn't well-suited for Sway: Sway doesn't need
any modularity, and signals make it trickier to track down exactly
what happens down the stack.
Replace Sway's output disable signal with a simple list tracking
for the only user.
This reverts commit e28e6484e8.
This change tried to remove nodes from all points of reference to allow
immediate destruction. However, it missed things like the children lists
cloned by transaction states of parent nodes.
Adding all that extra cleanup would not be in the spirit of a PR
claiming to simplify teardown. Let's wait for someone to come up with a
cleaner approach instead.
Fixes: https://github.com/swaywm/sway/pull/8738
When a container is detached, we need to remove it from any lists it may
be part of. We use container_get_siblings to obtain the relevant list,
find our entry and remove it.
If the container is in a later list than the one returned by
container_get_siblings, or is in multiple lists for some reason,
container_detach will fail to remove the container, leaving a dangling
pointer when the container is freed.
Instead of calling container_get_siblings, check and remove the
container from all lists.
A sway_node may end up being referenced in either a queued transaction,
pending transaction or as a dirty node. To manage this, the transaction
system has been responsible for destroying containers, workspaces and
outputs at the end of their last referenced transaction.
This significantly complicates the teardown flow of surfaces and
outputs. Instead, remove the node from transactions and dirty lists so
that the callsite can remove and free the node immediately.