From dde301035369f89bedc2ce9085b594d62751425b Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 27 Dec 2021 13:30:02 +0200 Subject: [PATCH] Move X11-specific code from interactive move resize handler to X11Client When moving or resizing a window on X11, the window based screen edges won't receive pointer input, so handleInteractiveMoveResize() explicitly pokes the ScreenEdges to check if there's any approached screen edge. On Wayland, it's not an issue. This change moves X11-specific code to X11Client to avoid checking screen edges twice. --- src/abstract_client.cpp | 4 ---- src/events.cpp | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/abstract_client.cpp b/src/abstract_client.cpp index ea2420c835..16b2c0df8b 100644 --- a/src/abstract_client.cpp +++ b/src/abstract_client.cpp @@ -1456,10 +1456,6 @@ void AbstractClient::handleInteractiveMoveResize(int x, int y, int x_root, int y } } - if (isInteractiveMove()) { - ScreenEdges::self()->check(globalPos, QDateTime::fromMSecsSinceEpoch(xTime(), Qt::UTC)); - } - Q_EMIT clientStepUserMovedResized(this, moveResizeGeometry()); } diff --git a/src/events.cpp b/src/events.cpp index b15aa5734a..116fd8b1a3 100644 --- a/src/events.cpp +++ b/src/events.cpp @@ -28,6 +28,7 @@ #include "unmanaged.h" #include "useractions.h" #include "effects.h" +#include "screenedge.h" #include "screens.h" #include "xcbutils.h" @@ -1046,6 +1047,10 @@ bool X11Client::motionNotifyEvent(xcb_window_t w, int state, int x, int y, int x } handleInteractiveMoveResize(QPoint(x, y), QPoint(x_root, y_root)); + if (isInteractiveMove()) { + ScreenEdges::self()->check(QPoint(x_root, y_root), QDateTime::fromMSecsSinceEpoch(xTime(), Qt::UTC)); + } + return true; }