[tabbox] Pass the tabbox window to elevate as a QWindow instead of winId
By using QWindow we can also find the TabBox window on Wayland where the winId is not really helpful. This also changes the elevation from Unamanged to Toplevel, so that it is no longer X11 specific. Result: TabBox stays on top of all windows also on Wayland.icc-effect-5.14.5
parent
59e3b96812
commit
aea4221575
|
@ -51,7 +51,7 @@ public:
|
|||
Q_UNUSED(client)
|
||||
return "desktop";
|
||||
}
|
||||
virtual void elevateClient(TabBox::TabBoxClient *c, WId tabbox, bool elevate) const {
|
||||
virtual void elevateClient(TabBox::TabBoxClient *c, QWindow *tabbox, bool elevate) const {
|
||||
Q_UNUSED(c)
|
||||
Q_UNUSED(tabbox)
|
||||
Q_UNUSED(elevate)
|
||||
|
|
|
@ -305,11 +305,11 @@ void TabBoxHandlerImpl::restack(TabBoxClient *c, TabBoxClient *under)
|
|||
static_cast<TabBoxClientImpl*>(under)->client(), true);
|
||||
}
|
||||
|
||||
void TabBoxHandlerImpl::elevateClient(TabBoxClient *c, WId tabbox, bool b) const
|
||||
void TabBoxHandlerImpl::elevateClient(TabBoxClient *c, QWindow *tabbox, bool b) const
|
||||
{
|
||||
auto cl = static_cast<TabBoxClientImpl*>(c)->client();
|
||||
cl->elevate(b);
|
||||
if (Unmanaged *w = Workspace::self()->findUnmanaged(tabbox))
|
||||
if (Toplevel *w = Workspace::self()->findInternal(tabbox))
|
||||
w->elevate(b);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
virtual int nextDesktopFocusChain(int desktop) const;
|
||||
virtual int numberOfDesktops() const;
|
||||
virtual TabBoxClientList stackingOrder() const;
|
||||
virtual void elevateClient(TabBoxClient* c, WId tabbox, bool elevate) const;
|
||||
virtual void elevateClient(TabBoxClient* c, QWindow *tabbox, bool elevate) const;
|
||||
virtual void raiseClient(TabBoxClient *client) const;
|
||||
virtual void restack(TabBoxClient *c, TabBoxClient *under);
|
||||
virtual void shadeClient(TabBoxClient *c, bool b) const;
|
||||
|
|
|
@ -169,10 +169,10 @@ void TabBoxHandlerPrivate::updateHighlightWindows()
|
|||
|
||||
if (q->isKWinCompositing()) {
|
||||
if (lastRaisedClient)
|
||||
q->elevateClient(lastRaisedClient, w ? w->winId() : 0, false);
|
||||
q->elevateClient(lastRaisedClient, w, false);
|
||||
lastRaisedClient = currentClient;
|
||||
if (currentClient)
|
||||
q->elevateClient(currentClient, w ? w->winId() : 0, true);
|
||||
q->elevateClient(currentClient, w, true);
|
||||
} else {
|
||||
if (lastRaisedClient) {
|
||||
q->shadeClient(lastRaisedClient, true);
|
||||
|
@ -226,7 +226,7 @@ void TabBoxHandlerPrivate::endHighlightWindows(bool abort)
|
|||
}
|
||||
QWindow *w = window();
|
||||
if (currentClient)
|
||||
q->elevateClient(currentClient, w ? w->winId() : 0, false);
|
||||
q->elevateClient(currentClient, w, false);
|
||||
if (abort && lastRaisedClient && lastRaisedClientSucc)
|
||||
q->restack(lastRaisedClient, lastRaisedClientSucc);
|
||||
lastRaisedClient = nullptr;
|
||||
|
|
|
@ -167,7 +167,7 @@ public:
|
|||
/**
|
||||
* De-/Elevate a client using the compositor (if enabled)
|
||||
*/
|
||||
virtual void elevateClient(TabBoxClient* c, WId tabbox, bool elevate) const = 0;
|
||||
virtual void elevateClient(TabBoxClient* c, QWindow *tabbox, bool elevate) const = 0;
|
||||
|
||||
/**
|
||||
* Raise a client (w/o activating it)
|
||||
|
|
Loading…
Reference in New Issue