Merge Options::MouseLower for Client and AbstractClient

The implementation in Client::performMouseCommand can now also be
used directly in AbstractClient.
This commit is contained in:
Martin Gräßlin 2016-02-18 10:30:58 +01:00
parent df4bb8296a
commit f0ec89f38b
2 changed files with 7 additions and 11 deletions

View file

@ -792,6 +792,13 @@ bool AbstractClient::performMouseCommand(Options::MouseCommand cmd, const QPoint
break;
case Options::MouseLower: {
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() && options->focusPolicyIsReasonable()) {
AbstractClient *next = workspace()->clientUnderMouse(screen());
if (next && next != this)
workspace()->requestFocus(next, false);
}
break;
}
case Options::MouseOperationsMenu:

View file

@ -1199,17 +1199,6 @@ bool Client::performMouseCommand(Options::MouseCommand command, const QPoint &gl
{
bool replay = false;
switch(command) {
case Options::MouseLower: {
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() && options->focusPolicyIsReasonable()) {
AbstractClient *next = workspace()->clientUnderMouse(screen());
if (next && next != this)
workspace()->requestFocus(next, false);
}
break;
}
case Options::MouseShade :
toggleShade();
cancelShadeHoverTimer();