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