summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2012-02-21 22:55:55 (GMT)
committerThomas Lübking <thomas.luebking@gmail.com>2012-03-07 19:49:44 (GMT)
commit095c602617949afc55e34d0634f8de8357ca28eb (patch)
tree7005b3f6b6b0a416ccf88b9223c8cf6b99e4d499
parentbcf0d8b4d38e26d09a1f8fc2b09d25f89f684671 (diff)
- lower windows does not change focus for F(S)UM
- lower by shortcut honors nextFocusPrefersMouse setting CCBUG: 80897 REVIEW: 104041
-rw-r--r--kwin/useractions.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/kwin/useractions.cpp b/kwin/useractions.cpp
index 5b74e2e..7614c72 100644
--- a/kwin/useractions.cpp
+++ b/kwin/useractions.cpp
@@ -820,7 +820,7 @@ bool Client::performMouseCommand(Options::MouseCommand command, const QPoint &gl
workspace()->lowerClient(this);
// used to be activateNextClient(this), then topClientOnDesktop
// since this is a mouseOp it's however safe to use the client under the mouse instead
- if (isActive()) {
+ if (isActive() && options->focusPolicyIsReasonable()) {
Client *next = workspace()->clientUnderMouse(screen());
if (next && next != this)
workspace()->requestFocus(next, false);
@@ -1239,8 +1239,15 @@ void Workspace::slotWindowLower()
// As this most likely makes the window no longer visible change the
// keyboard focus to the next available window.
//activateNextClient( c ); // Doesn't work when we lower a child window
- if (active_client->isActive())
- activateClient(topClientOnDesktop(currentDesktop(), -1));
+ if (active_client->isActive() && options->focusPolicyIsReasonable()) {
+ if (options->nextFocusPrefersMouse) {
+ Client *next = clientUnderMouse(active_client->screen());
+ if (next && next != active_client)
+ requestFocus(next, false);
+ } else {
+ activateClient(topClientOnDesktop(currentDesktop(), -1));
+ }
+ }
}
}