From f052173ddbd35e3b34c6714736f31751fd230fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 6 Mar 2016 17:35:12 +0100 Subject: [PATCH] [kstyle] Disable window move on Wayland Unfortunately we cannot support moving windows from the style on Wayland (yet). To move a window we need the (Xdg)ShellSurface and the wl_seat. Through the integration plugin we can get the ShellSurface, but not the seat. Thus we cannot invoke the feature through KWayland. We either need to extend the native interface and/or extend QWindow to expose a startSystemMove (QPlatformWindow already supports a startSystemResize). REVIEW: 127301 --- kstyle/breezewindowmanager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kstyle/breezewindowmanager.cpp b/kstyle/breezewindowmanager.cpp index a2d5bca2..ff91ddbe 100644 --- a/kstyle/breezewindowmanager.cpp +++ b/kstyle/breezewindowmanager.cpp @@ -570,6 +570,12 @@ namespace Breeze bool WindowManager::canDrag( QWidget* widget, QWidget* child, const QPoint& position ) { + // do not start drag on Wayland, this is not yet supported + // To implement integration with KWayland is required + // and QtWayland must support getting the wl_seat. + // Other option would be adding support to Qt for starting a move + if( Helper::isWayland() ) return false; + // retrieve child at given position and check cursor again if( child && child->cursor().shape() != Qt::ArrowCursor ) return false;