From 770df8c66b96ec50a248a6ef6e1ac2cd3c63a67b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Mon, 10 Oct 2011 20:45:32 +0200 Subject: [PATCH] Force input replay for non activatable windows BUG: 283474 REVIEW: 102795 FIXED-IN: 4.8 --- useractions.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/useractions.cpp b/useractions.cpp index 521253aaac..59ba42ea13 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -843,20 +843,34 @@ bool Client::performMouseCommand(Options::MouseCommand command, const QPoint &gl case Options::MouseToggleRaiseAndLower: workspace()->raiseOrLowerClient(this); break; - case Options::MouseActivateAndRaise: + case Options::MouseActivateAndRaise: { replay = isActive(); // for clickraise mode + bool mustReplay = !rules()->checkAcceptFocus(input); + if (mustReplay) { + ClientList::const_iterator it = workspace()->stackingOrder().constEnd(), + begin = workspace()->stackingOrder().constBegin(); + while (mustReplay && --it != begin && *it != this) { + if (((*it)->keepAbove() && !keepAbove()) || (keepBelow() && !(*it)->keepBelow())) + continue; // can never raise above "it" + mustReplay = !((*it)->isOnCurrentDesktop() && (*it)->isOnCurrentActivity() && (*it)->geometry().intersects(geometry())); + } + } workspace()->takeActivity(this, ActivityFocus | ActivityRaise, handled && replay); workspace()->setActiveScreenMouse(globalPos); + replay = replay || mustReplay; break; + } case Options::MouseActivateAndLower: workspace()->requestFocus(this); workspace()->lowerClient(this); workspace()->setActiveScreenMouse(globalPos); + replay = replay || !rules()->checkAcceptFocus(input); break; case Options::MouseActivate: replay = isActive(); // for clickraise mode workspace()->takeActivity(this, ActivityFocus, handled && replay); workspace()->setActiveScreenMouse(globalPos); + replay = replay || !rules()->checkAcceptFocus(input); break; case Options::MouseActivateRaiseAndPassClick: workspace()->takeActivity(this, ActivityFocus | ActivityRaise, handled);