diff --git a/tabbox/tabbox.cpp b/tabbox/tabbox.cpp index d6995598c9..8eedefe885 100644 --- a/tabbox/tabbox.cpp +++ b/tabbox/tabbox.cpp @@ -254,6 +254,15 @@ void TabBoxHandlerImpl::restack(TabBoxClient *c, TabBoxClient *under) static_cast(under)->client()); } +void TabBoxHandlerImpl::elevateClient(TabBoxClient *c, bool b) const +{ + if (effects) { + const Client *cl = static_cast(c)->client(); + if (EffectWindow *w = static_cast(effects)->findWindow(cl->window())) + static_cast(effects)->setElevatedWindow(w, b); + } +} + TabBoxClient* TabBoxHandlerImpl::desktopClient() const { diff --git a/tabbox/tabbox.h b/tabbox/tabbox.h index c86a572850..05a129a612 100644 --- a/tabbox/tabbox.h +++ b/tabbox/tabbox.h @@ -54,6 +54,7 @@ public: virtual int nextDesktopFocusChain(int desktop) const; virtual int numberOfDesktops() const; virtual TabBoxClientList stackingOrder() const; + virtual void elevateClient(TabBoxClient* c, bool elevate) const; virtual void raiseClient(TabBoxClient *client) const; virtual void restack(TabBoxClient *c, TabBoxClient *under); virtual TabBoxClient* clientToAddToList(TabBoxClient* client, int desktop) const; diff --git a/tabbox/tabboxhandler.cpp b/tabbox/tabboxhandler.cpp index 2950e51464..98c7b2ad72 100644 --- a/tabbox/tabboxhandler.cpp +++ b/tabbox/tabboxhandler.cpp @@ -135,7 +135,13 @@ void TabBoxHandlerPrivate::updateHighlightWindows() Display *dpy = QX11Info::display(); TabBoxClient *currentClient = q->client(index); - if (!KWindowSystem::compositingActive()) { + if (KWindowSystem::compositingActive()) { + if (lastRaisedClient) + q->elevateClient(lastRaisedClient, false); + lastRaisedClient = currentClient; + if (currentClient) + q->elevateClient(currentClient, true); + } else { if (lastRaisedClient) { if (lastRaisedClientSucc) q->restack(lastRaisedClient, lastRaisedClientSucc); @@ -182,6 +188,9 @@ void TabBoxHandlerPrivate::updateHighlightWindows() void TabBoxHandlerPrivate::endHighlightWindows(bool abort) { + TabBoxClient *currentClient = q->client(index); + if (currentClient) + q->elevateClient(currentClient, false); if (abort && lastRaisedClient && lastRaisedClientSucc) q->restack(lastRaisedClient, lastRaisedClientSucc); lastRaisedClient = 0; diff --git a/tabbox/tabboxhandler.h b/tabbox/tabboxhandler.h index 03fee91374..0d5f9faafd 100644 --- a/tabbox/tabboxhandler.h +++ b/tabbox/tabboxhandler.h @@ -136,6 +136,11 @@ public: */ virtual int nextDesktopFocusChain(int desktop) const = 0; + /** + * De-/Elevate a client using the compositor (if enabled) + */ + virtual void elevateClient(TabBoxClient* c, bool elevate) const = 0; + /** * Raise a client (w/o activating it) */