[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-workspace] kwin: fake a move event when dropping out of quick tiling
From: Thomas_Lübking <thomas.luebking () gmail ! com>
Date: 2012-03-21 22:11:19
Message-ID: 20120321221119.3AE27A60A9 () git ! kde ! org
[Download RAW message or body]
Git commit 3e011abbdaad63abb3396f86f39f210007dace15 by Thomas Lübking.
Committed on 19/03/2012 at 19:23.
Pushed by luebking into branch 'master'.
fake a move event when dropping out of quick tiling
BUG: 228815
REVIEW: 104347
M +4 -0 kwin/geometry.cpp
http://commits.kde.org/kde-workspace/3e011abbdaad63abb3396f86f39f210007dace15
diff --git a/kwin/geometry.cpp b/kwin/geometry.cpp
index f7252ee..225774a 100644
--- a/kwin/geometry.cpp
+++ b/kwin/geometry.cpp
@@ -2510,6 +2510,7 @@ bool Client::startMoveResize()
// If we have quick maximization enabled then it's safe to automatically restore \
windows
// 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 @@ -2524,6 +2525,7 @@ bool Client::startMoveResize()
// 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 @@ -2545,6 +2547,8 @@ bool Client::startMoveResize()
options->electricBorderTiling())
workspace()->screenEdge()->reserveDesktopSwitching(true);
#endif
+ if (fakeMove) // fix geom_pretile position - it HAS to happen at the end, ie. \
when all moving is set up. inline call will lock focus!! + \
handleMoveResize(QCursor::pos().x(), QCursor::pos().y(), QCursor::pos().x(), \
QCursor::pos().y()); return true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic