mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-04 01:41:18 -05:00
types: implement xdg-toplevel-drag-v1 protocol
This protocol allows clients to attach a toplevel window to an ongoing drag-and-drop operation, enabling features like browser tab tear-off. The attached toplevel follows the cursor during the drag, moving as if xdg_toplevel.move was called. The window is automatically detached when unmapped or when its surface is destroyed. Implementation details: - Listen to both unmap and destroy events on the toplevel surface to properly clean up when the surface is destroyed while still mapped - Emit new_toplevel_drag event when a drag is created, allowing compositors to track attached toplevels - The toplevel pointer becomes NULL when detached, which compositors must handle during motion events.
This commit is contained in:
parent
0e9c6ddefa
commit
44475dc062
4 changed files with 388 additions and 0 deletions
|
|
@ -104,6 +104,7 @@ wlr_files += files(
|
|||
'wlr_xdg_foreign_registry.c',
|
||||
'wlr_xdg_output_v1.c',
|
||||
'wlr_xdg_system_bell_v1.c',
|
||||
'wlr_xdg_toplevel_drag_v1.c',
|
||||
'wlr_xdg_toplevel_icon_v1.c',
|
||||
'wlr_xdg_toplevel_tag_v1.c',
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue