Remove interaction of quick tiling with ScreenEdges
Quick tiling/maximizing of Clients is completely independent of the screen edges functionality. That is it determines the borders itself. Nevertheless there has been some code still around which interacted with the screen edges each time a window was moved. This code is completely useless.
This commit is contained in:
parent
e47fdf5caa
commit
4c0f9f8bbd
1 changed files with 2 additions and 45 deletions
47
geometry.cpp
47
geometry.cpp
|
@ -2574,9 +2574,7 @@ bool Client::startMoveResize()
|
|||
Notify::raise(isResize() ? Notify::ResizeStart : Notify::MoveStart);
|
||||
emit clientStartUserMovedResized(this);
|
||||
#ifdef KWIN_BUILD_SCREENEDGES
|
||||
if (options->electricBorders() == Options::ElectricMoveOnly ||
|
||||
options->electricBorderMaximize() ||
|
||||
options->electricBorderTiling())
|
||||
if (options->electricBorders() == Options::ElectricMoveOnly)
|
||||
workspace()->screenEdge()->reserveDesktopSwitching(true, Qt::Vertical|Qt::Horizontal);
|
||||
#endif
|
||||
if (fakeMove) // fix geom_restore position - it HAS to happen at the end, ie. when all moving is set up. inline call will lock focus!!
|
||||
|
@ -2584,37 +2582,6 @@ bool Client::startMoveResize()
|
|||
return true;
|
||||
}
|
||||
|
||||
static ElectricBorder electricBorderFromMode(QuickTileMode mode)
|
||||
{
|
||||
// special case, currently maxmizing is done from the electric top corner
|
||||
if (mode == QuickTileMaximize)
|
||||
return ElectricTop;
|
||||
|
||||
// sanitize the mode, ie. simplify "invalid" combinations
|
||||
if ((mode & QuickTileHorizontal) == QuickTileHorizontal)
|
||||
mode &= ~QuickTileHorizontal;
|
||||
if ((mode & QuickTileVertical) == QuickTileVertical)
|
||||
mode &= ~QuickTileVertical;
|
||||
|
||||
if (mode == QuickTileLeft)
|
||||
return ElectricLeft;
|
||||
if (mode == QuickTileRight)
|
||||
return ElectricRight;
|
||||
if (mode == (QuickTileTop|QuickTileLeft))
|
||||
return ElectricTopLeft;
|
||||
if (mode == (QuickTileTop|QuickTileRight))
|
||||
return ElectricTopRight;
|
||||
if (mode == (QuickTileBottom|QuickTileLeft))
|
||||
return ElectricBottomLeft;
|
||||
if (mode == (QuickTileBottom|QuickTileRight))
|
||||
return ElectricBottomRight;
|
||||
if (mode == QuickTileTop)
|
||||
return ElectricTop;
|
||||
if (mode == QuickTileBottom)
|
||||
return ElectricBottom;
|
||||
return ElectricNone;
|
||||
}
|
||||
|
||||
void Client::finishMoveResize(bool cancel)
|
||||
{
|
||||
const bool wasResize = isResize(); // store across leaveMoveResize
|
||||
|
@ -2642,14 +2609,6 @@ void Client::finishMoveResize(bool cancel)
|
|||
|
||||
if (isElectricBorderMaximizing()) {
|
||||
setQuickTileMode(electricMode);
|
||||
const ElectricBorder border = electricBorderFromMode(electricMode);
|
||||
if (border == ElectricNone)
|
||||
kDebug(1212) << "invalid electric mode" << electricMode << "leading to invalid array access,\
|
||||
this should not have happened!";
|
||||
#ifdef KWIN_BUILD_SCREENEDGES
|
||||
else
|
||||
workspace()->screenEdge()->restoreSize(border);
|
||||
#endif
|
||||
electricMaximizing = false;
|
||||
workspace()->outline()->hide();
|
||||
} else if (!cancel) {
|
||||
|
@ -2697,9 +2656,7 @@ void Client::leaveMoveResize()
|
|||
syncRequest.timeout = NULL;
|
||||
#endif
|
||||
#ifdef KWIN_BUILD_SCREENEDGES
|
||||
if (options->electricBorders() == Options::ElectricMoveOnly ||
|
||||
options->electricBorderMaximize() ||
|
||||
options->electricBorderTiling())
|
||||
if (options->electricBorders() == Options::ElectricMoveOnly)
|
||||
workspace()->screenEdge()->reserveDesktopSwitching(false, Qt::Vertical|Qt::Horizontal);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue