use compositor to elevate current tabbox window
BUG: 297809 REVIEW: 104538
This commit is contained in:
parent
797735ec8a
commit
0fe48f971d
4 changed files with 25 additions and 1 deletions
|
@ -254,6 +254,15 @@ void TabBoxHandlerImpl::restack(TabBoxClient *c, TabBoxClient *under)
|
|||
static_cast<TabBoxClientImpl*>(under)->client());
|
||||
}
|
||||
|
||||
void TabBoxHandlerImpl::elevateClient(TabBoxClient *c, bool b) const
|
||||
{
|
||||
if (effects) {
|
||||
const Client *cl = static_cast<TabBoxClientImpl*>(c)->client();
|
||||
if (EffectWindow *w = static_cast<EffectsHandlerImpl*>(effects)->findWindow(cl->window()))
|
||||
static_cast<EffectsHandlerImpl*>(effects)->setElevatedWindow(w, b);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TabBoxClient* TabBoxHandlerImpl::desktopClient() const
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue