diff --git a/manage.cpp b/manage.cpp index 3c81c41b83..4583a97a6f 100644 --- a/manage.cpp +++ b/manage.cpp @@ -207,7 +207,7 @@ bool Client::manage(Window w, bool isMapped) } } if (desk == 0) // Assume window wants to be visible on the current desktop - desk = workspace()->currentDesktop(); + desk = isDesktop() ? NET::OnAllDesktops : workspace()->currentDesktop(); desk = rules()->checkDesktop(desk, !isMapped); if (desk != NET::OnAllDesktops) // Do range check desk = qMax(1, qMin(workspace()->numberOfDesktops(), desk)); diff --git a/scene_xrender.cpp b/scene_xrender.cpp index 9de5fb74a2..c9caa87142 100644 --- a/scene_xrender.cpp +++ b/scene_xrender.cpp @@ -653,10 +653,12 @@ XRenderComposite(display(), PictOpOver, m_xrenderShadow->shadowPixmap(SceneXRend #undef RENDER_SHADOW_TILE // Paint the window contents - Picture clientAlpha = opaque ? None : alphaMask(data.opacity); - XRenderComposite(display(), clientRenderOp, pic, clientAlpha, renderTarget, cr.x(), cr.y(), 0, 0, dr.x(), dr.y(), dr.width(), dr.height()); - if (!opaque) - transformed_shape = QRegion(); + if (!(client && client->isShade())) { + Picture clientAlpha = opaque ? None : alphaMask(data.opacity); + XRenderComposite(display(), clientRenderOp, pic, clientAlpha, renderTarget, cr.x(), cr.y(), 0, 0, dr.x(), dr.y(), dr.width(), dr.height()); + if (!opaque) + transformed_shape = QRegion(); + } #define RENDER_DECO_PART(_PART_, _RECT_) \ XRenderComposite(display(), PictOpOver, _PART_->x11PictureHandle(), decorationAlpha, renderTarget,\ diff --git a/useractions.cpp b/useractions.cpp index a1fec6ca85..1c8e47d190 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -799,7 +799,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); @@ -1208,8 +1208,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)); + } + } } }