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.
This commit is contained in:
Vlad Zahorodnii 2021-12-27 13:30:02 +02:00
parent d85ab218ee
commit dde3010353
2 changed files with 5 additions and 4 deletions

View file

@ -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());
}

View file

@ -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;
}