workspace,window: don't elevate windows during electric border tiling / maximizing

Instead, move the outline below the window, so that the visual order of things stays the
same. This also fixes a visual glitch, where the outline is visible for a moment after
maximization, and is above the no-longer-elevated window

BUG: 436466
BUG: 354741
This commit is contained in:
Xaver Hugl 2024-06-06 18:49:17 +02:00
parent bffae41983
commit b2ff465490
2 changed files with 9 additions and 2 deletions

View file

@ -564,6 +564,9 @@ void Window::updateLayer()
Layer Window::belongsToLayer() const
{
if (isOutline()) {
return NormalLayer;
}
if (isUnmanaged() || isInternal()) {
return OverlayLayer;
}
@ -2415,7 +2418,6 @@ void Window::leaveInteractiveMoveResize()
}
if (isElectricBorderMaximizing()) {
workspace()->outline()->hide();
elevate(false);
}
}
@ -3382,7 +3384,6 @@ void Window::setElectricBorderMaximizing(bool maximizing)
} else {
workspace()->outline()->hide();
}
elevate(maximizing);
}
QRectF Window::quickTileGeometry(QuickTileMode mode, const QPointF &pos) const

View file

@ -751,6 +751,9 @@ void Workspace::addUnmanaged(X11Window *window)
m_windows.append(window);
addToStack(window);
updateStackingOrder(true);
if (window->isOutline() && m_moveResizeWindow) {
constrain(window, m_moveResizeWindow);
}
Q_EMIT windowAdded(window);
}
@ -2077,6 +2080,9 @@ void Workspace::addInternalWindow(InternalWindow *window)
}
updateStackingOrder(true);
if (window->isOutline() && moveResizeWindow()) {
constrain(window, moveResizeWindow());
}
Q_EMIT windowAdded(window);
}