Commit cc50c7b9 authored by Thomas Lübking's avatar Thomas Lübking
Browse files

don't leave quick tiling for FS windows

REVIEW: 107317
BUG: 309170
parent ff9d5958
......@@ -2544,24 +2544,27 @@ bool Client::startMoveResize()
// when starting a move as the user can undo their action by moving the window back to
// the top of the screen. When the setting is disabled then doing so is confusing.
bool fakeMove = false;
if (maximizeMode() != MaximizeRestore && (maximizeMode() != MaximizeFull || options->moveResizeMaximizedWindows())) {
// allow moveResize, but unset maximization state in resize case
if (mode != PositionCenter) { // means "isResize()" but moveResizeMode = true is set below
if (maximizeMode() == MaximizeFull) { // partial is cond. reset in finishMoveResize
geom_restore = geometry(); // "restore" to current geometry
setMaximize(false, false);
}
} else if (quick_tile_mode != QuickTileNone) // no longer now - we move, resize is handled below
setQuickTileMode(QuickTileNone); // otherwise we mess every second tile, bug #303937
} else if ((maximizeMode() == MaximizeFull && options->electricBorderMaximize()) ||
(quick_tile_mode != QuickTileNone && isMovable() && mode == PositionCenter)) {
// Exit quick tile mode when the user attempts to move a tiled window, cannot use isMove() yet
const QRect before = geometry();
setQuickTileMode(QuickTileNone);
// Move the window so it's under the cursor
moveOffset = QPoint(double(moveOffset.x()) / double(before.width()) * double(geom_restore.width()),
double(moveOffset.y()) / double(before.height()) * double(geom_restore.height()));
fakeMove = true;
if (!isFullScreen()) { // xinerama move across screens -> window is FS, everything else is secondary and untouched
if (maximizeMode() != MaximizeRestore &&
(maximizeMode() != MaximizeFull || options->moveResizeMaximizedWindows())) {
// allow moveResize, but unset maximization state in resize case
if (mode != PositionCenter) { // means "isResize()" but moveResizeMode = true is set below
if (maximizeMode() == MaximizeFull) { // partial is cond. reset in finishMoveResize
geom_restore = geometry(); // "restore" to current geometry
setMaximize(false, false);
}
} else if (quick_tile_mode != QuickTileNone) // no longer now - we move, resize is handled below
setQuickTileMode(QuickTileNone); // otherwise we mess every second tile, bug #303937
} else if ((maximizeMode() == MaximizeFull && options->electricBorderMaximize()) ||
(quick_tile_mode != QuickTileNone && isMovable() && mode == PositionCenter)) {
// Exit quick tile mode when the user attempts to move a tiled window, cannot use isMove() yet
const QRect before = geometry();
setQuickTileMode(QuickTileNone);
// Move the window so it's under the cursor
moveOffset = QPoint(double(moveOffset.x()) / double(before.width()) * double(geom_restore.width()),
double(moveOffset.y()) / double(before.height()) * double(geom_restore.height()));
fakeMove = true;
}
}
if (quick_tile_mode != QuickTileNone && mode != PositionCenter) { // Cannot use isResize() yet
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment