Avoid resizing the tile until interactive resize is actually active
It's confusing, but handleInteractiveMoveResize() can be called while interactive move resize is inactive.
This commit is contained in:
parent
b712c26457
commit
78e0ff6b97
1 changed files with 6 additions and 5 deletions
|
@ -1826,15 +1826,11 @@ void Window::handleInteractiveMoveResize(const QPointF &local, const QPointF &gl
|
|||
|
||||
void Window::handleInteractiveMoveResize(int x, int y, int x_root, int y_root)
|
||||
{
|
||||
const Gravity gravity = interactiveMoveResizeGravity();
|
||||
if (m_tile && m_tile->supportsResizeGravity(gravity)) {
|
||||
m_tile->resizeFromGravity(gravity, x_root, y_root);
|
||||
return;
|
||||
}
|
||||
if (isWaitingForInteractiveMoveResizeSync()) {
|
||||
return; // we're still waiting for the client or the timeout
|
||||
}
|
||||
|
||||
const Gravity gravity = interactiveMoveResizeGravity();
|
||||
if ((gravity == Gravity::None && !isMovableAcrossScreens())
|
||||
|| (gravity != Gravity::None && (isShade() || !isResizable()))) {
|
||||
return;
|
||||
|
@ -1897,6 +1893,11 @@ void Window::handleInteractiveMoveResize(int x, int y, int x_root, int y_root)
|
|||
};
|
||||
|
||||
if (isInteractiveResize()) {
|
||||
if (m_tile && m_tile->supportsResizeGravity(gravity)) {
|
||||
m_tile->resizeFromGravity(gravity, x_root, y_root);
|
||||
return;
|
||||
}
|
||||
|
||||
QRectF orig = initialInteractiveMoveResizeGeometry();
|
||||
SizeMode sizeMode = SizeModeAny;
|
||||
auto calculateMoveResizeGeom = [&topleft, &bottomright, &orig, &nextMoveResizeGeom, &sizeMode, &gravity]() {
|
||||
|
|
Loading…
Reference in a new issue