From ee782c8a91bfc08db47f63f3f4a00edd4e89f5f7 Mon Sep 17 00:00:00 2001 From: David Redondo Date: Thu, 1 Feb 2024 14:26:18 +0100 Subject: [PATCH] Update to merged version of xdg-toplevel-drag --- .../protocols/xdg-toplevel-drag-v1.xml | 83 ++++++++++--------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/src/wayland/protocols/xdg-toplevel-drag-v1.xml b/src/wayland/protocols/xdg-toplevel-drag-v1.xml index b29d802f18..79b662f89d 100644 --- a/src/wayland/protocols/xdg-toplevel-drag-v1.xml +++ b/src/wayland/protocols/xdg-toplevel-drag-v1.xml @@ -2,7 +2,7 @@ - Copyright 2023 David Redondo <kde@david-redondo.de> + Copyright 2023 David Redondo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -37,8 +37,8 @@ wl_data_device.start_drag. Once the client determines that the detachable window contents should be detached from the originating window, it creates a new xdg_toplevel with these contents and issues a - xdg_toplevel_drag_v1.attach request. From now on the new window is moved - by the compositor during the drag as if the client called + xdg_toplevel_drag_v1.attach request before mapping it. From now on the new + window is moved by the compositor during the drag as if the client called xdg_toplevel.move. Dragging an existing window is similar. The client creates a @@ -49,10 +49,11 @@ can be docked or undocked. If the client wants to snap a window into a parent window it should delete or unmap the dragged top-level. If the contents should be detached again it attaches a new toplevel as described - above. If a drag operation is cancelled, clients should revert to the - previous state, deleting any newly created windows as appropriate. - When a drag operation ends the dragged toplevel window's final position is - determined as if a xdg_toplevel_move operation ended. + above. If a drag operation is cancelled without being dropped, clients + should revert to the previous state, deleting any newly created windows + as appropriate. When a drag operation ends as indicated by + wl_data_source.dnd_drop_performed the dragged toplevel window's final + position is determined as if a xdg_toplevel_move operation ended. Warning! The protocol described in this file is currently in the testing phase. Backward compatible changes may be added together with the @@ -60,6 +61,19 @@ only be done by creating a new major version of the extension. + + + + + + + Destroy this xdg_toplevel_drag_manager_v1 object. Other objects, + including xdg_toplevel_drag_v1 objects created by this factory, are not + affected by this request. + + + Create an xdg_toplevel_drag for a drag and drop operation that is going @@ -77,32 +91,36 @@ - - - - Destroy this xdg_toplevel_drag_manager_v1 object. Other objects, - including xdg_toplevel_drag_v1 objects created by this factory, are not - affected by this request. - - - - - - + + + + + + + + Destroy this xdg_toplevel_drag_v1 object. This request must only be + called after the underlying wl_data_source drag has ended, as indicated + by the dnd_drop_performed or cancelled events. In any other case an + ongoing_drag error is raised. + + + Request that the window will be moved with the cursor during the drag - operation. The offset describes how the toplevel will be positioned - relative to the cursor hotspot in surface local coordinates. The - attached window does not participate in the selection of the drag - target. + operation. The offset is a hint to the compositor how the toplevel + should be positioned relative to the cursor hotspot in surface local + coordinates. For example it might only be used when an unmapped window + is attached. The attached window does not participate in the selection + of the drag target. If the toplevel is unmapped while it is attached, it is automatically detached from the drag. In this case this request has to be called again @@ -118,22 +136,5 @@ - - - Destroy this xdg_toplevel_drag_v1 object. This request must only be - called after the underlying wl_data_source drag has ended, as indicated - by the dnd_drop_performed or cancelled events. In any other case an - ongoing_drag error is raised. - - - - - - - - -