diff options
author | David Redondo <qt@david-redondo.de> | 2023-03-10 16:47:19 +0100 |
---|---|---|
committer | David Edmundson <davidedmundson@kde.org> | 2023-06-05 09:32:22 +0100 |
commit | 40a27c26cee7ad4e5e32eb01568777cd4e9da25c (patch) | |
tree | fa5e5769f37cfd23551fa8380d8bc89a44f1dc43 /src/client/qwaylanddisplay.cpp | |
parent | 345a612894a561846edba3b28b5f743653a23d12 (diff) |
client: Implement qt-toplevel-drag-v1
This protocol for tabs toolbars and dock widgets to be dragged in and
out of a main window using an extended version of the drag and drop
protocol. Application code in QtBase use a special internal mimedata to
specify a window that should be associated with a drag.
This is 1:1 match with the pending upstream proposal xdg-toplevel-drag,
and can be switched when that lands.
Change-Id: Idf0afb71cd98d45938b4641ce861484fffac911c
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index c49cb428a..ae066beca 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -53,6 +53,7 @@ #include <QtWaylandClient/private/qwayland-fractional-scale-v1.h> #include <QtWaylandClient/private/qwayland-viewporter.h> #include <QtWaylandClient/private/qwayland-cursor-shape-v1.h> +#include <QtWaylandClient/private/qwayland-qt-toplevel-drag-v1.h> #include <QtCore/private/qcore_unix_p.h> @@ -758,6 +759,9 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin mViewporter.reset(new QtWayland::wp_viewporter(registry, id, qMin(1u, version))); } else if (interface == QLatin1String(QtWayland::wp_cursor_shape_manager_v1::interface()->name)) { mCursorShapeManager.reset(new QtWayland::wp_cursor_shape_manager_v1(registry, id, std::min(1u, version))); + } else if ( + interface == QLatin1String(QtWayland::qt_toplevel_drag_manager_v1::interface()->name)) { + mXdgToplevelDragManager.reset(new QtWayland::qt_toplevel_drag_manager_v1(registry, id, 1)); } mGlobals.append(RegistryGlobal(id, interface, version, registry)); |