Remove Workspace::updateClientLayer()
It's the same as calling AbstactClient::updateLayer()
This commit is contained in:
parent
4ba249eee5
commit
7c0bb4180a
6 changed files with 12 additions and 24 deletions
|
@ -209,13 +209,13 @@ void AbstractClient::setActive(bool act)
|
|||
setShade(ShadeNormal);
|
||||
|
||||
StackingUpdatesBlocker blocker(workspace());
|
||||
workspace()->updateClientLayer(this); // active windows may get different layer
|
||||
updateLayer(); // active windows may get different layer
|
||||
auto mainclients = mainClients();
|
||||
for (auto it = mainclients.constBegin();
|
||||
it != mainclients.constEnd();
|
||||
++it)
|
||||
if ((*it)->isFullScreen()) // fullscreens go high even if their transient is active
|
||||
workspace()->updateClientLayer(*it);
|
||||
(*it)->updateLayer();
|
||||
|
||||
doSetActive();
|
||||
emit activeChanged();
|
||||
|
@ -338,7 +338,7 @@ void AbstractClient::setKeepAbove(bool b)
|
|||
}
|
||||
m_keepAbove = b;
|
||||
doSetKeepAbove();
|
||||
workspace()->updateClientLayer(this);
|
||||
updateLayer();
|
||||
updateWindowRules(Rules::Above);
|
||||
|
||||
emit keepAboveChanged(m_keepAbove);
|
||||
|
@ -358,7 +358,7 @@ void AbstractClient::setKeepBelow(bool b)
|
|||
}
|
||||
m_keepBelow = b;
|
||||
doSetKeepBelow();
|
||||
workspace()->updateClientLayer(this);
|
||||
updateLayer();
|
||||
updateWindowRules(Rules::Below);
|
||||
|
||||
emit keepBelowChanged(m_keepBelow);
|
||||
|
|
|
@ -244,7 +244,7 @@ void Workspace::setActiveClient(AbstractClient* c)
|
|||
if (screens()->count() > 1) {
|
||||
for (auto it = m_allClients.begin(); it != m_allClients.end(); ++it) {
|
||||
if (*it != active_client && (*it)->layer() == ActiveLayer && (*it)->screen() == active_client->screen()) {
|
||||
updateClientLayer(*it);
|
||||
(*it)->updateLayer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,10 +52,6 @@
|
|||
see Workspace::constrainedStackingOrder(), they may also be in higher layers, but
|
||||
they should never be below their mainwindow.
|
||||
|
||||
When some client attribute changes (above/below flag, transiency...),
|
||||
Workspace::updateClientLayer() should be called in order to make
|
||||
sure it's moved to the appropriate layer QList<X11Client *> if needed.
|
||||
|
||||
Currently the things that affect client in which layer a client
|
||||
belongs: KeepAbove/Keep Below flags, window type, fullscreen
|
||||
state and whether the client is active, mainclient (transiency).
|
||||
|
@ -95,12 +91,6 @@ namespace KWin
|
|||
// Workspace
|
||||
//*******************************
|
||||
|
||||
void Workspace::updateClientLayer(AbstractClient* c)
|
||||
{
|
||||
if (c)
|
||||
c->updateLayer();
|
||||
}
|
||||
|
||||
void Workspace::updateStackingOrder(bool propagate_new_clients)
|
||||
{
|
||||
if (block_stacking_updates > 0) {
|
||||
|
|
|
@ -724,7 +724,7 @@ void Workspace::addClient(X11Client *c)
|
|||
addToStack(c);
|
||||
markXStackingOrderAsDirty();
|
||||
updateClientArea(); // This cannot be in manage(), because the client got added only now
|
||||
updateClientLayer(c);
|
||||
c->updateLayer();
|
||||
if (c->isDesktop()) {
|
||||
raiseClient(c);
|
||||
// If there's no active client, make this desktop the active one
|
||||
|
@ -822,7 +822,7 @@ void Workspace::removeDeleted(Deleted* c)
|
|||
void Workspace::addShellClient(AbstractClient *client)
|
||||
{
|
||||
setupClientConnections(client);
|
||||
updateClientLayer(client);
|
||||
client->updateLayer();
|
||||
|
||||
if (client->isPlaceable()) {
|
||||
const QRect area = clientArea(PlacementArea, Screens::self()->current(), client->desktop());
|
||||
|
@ -851,7 +851,7 @@ void Workspace::addShellClient(AbstractClient *client)
|
|||
}
|
||||
updateTabbox();
|
||||
connect(client, &AbstractClient::windowShown, this, [this, client] {
|
||||
updateClientLayer(client);
|
||||
client->updateLayer();
|
||||
markXStackingOrderAsDirty();
|
||||
updateStackingOrder(true);
|
||||
updateClientArea();
|
||||
|
|
|
@ -196,7 +196,6 @@ public:
|
|||
void lowerClientRequest(AbstractClient* c);
|
||||
void restackClientUnderActive(AbstractClient*);
|
||||
void restack(AbstractClient *c, AbstractClient *under, bool force = false);
|
||||
void updateClientLayer(AbstractClient* c);
|
||||
void raiseOrLowerClient(AbstractClient*);
|
||||
void resetUpdateToolWindowsTimer();
|
||||
void restoreSessionStackingOrder(X11Client *c);
|
||||
|
|
|
@ -418,8 +418,7 @@ bool X11Client::manage(xcb_window_t w, bool isMapped)
|
|||
|
||||
// Make sure that the input window is created before we update the stacking order
|
||||
updateInputWindow();
|
||||
|
||||
workspace()->updateClientLayer(this);
|
||||
updateLayer();
|
||||
|
||||
SessionInfo* session = workspace()->takeSessionInfo(this);
|
||||
if (session) {
|
||||
|
@ -2938,7 +2937,7 @@ void X11Client::setTransient(xcb_window_t new_transient_for_id)
|
|||
} // checkGroup() will check 'check_active_modal'
|
||||
setTransientFor(transient_for);
|
||||
checkGroup(nullptr, true); // force, because transiency has changed
|
||||
workspace()->updateClientLayer(this);
|
||||
updateLayer();
|
||||
workspace()->resetUpdateToolWindowsTimer();
|
||||
emit transientChanged();
|
||||
}
|
||||
|
@ -3377,7 +3376,7 @@ void X11Client::checkGroup(Group* set_group, bool force)
|
|||
old_group->deref(); // can be now deleted if empty
|
||||
checkGroupTransients();
|
||||
checkActiveModal();
|
||||
workspace()->updateClientLayer(this);
|
||||
updateLayer();
|
||||
}
|
||||
|
||||
// used by Workspace::findClientLeaderGroup()
|
||||
|
@ -4458,7 +4457,7 @@ void X11Client::setFullScreen(bool set, bool user)
|
|||
GeometryUpdatesBlocker blocker2(this);
|
||||
|
||||
// active fullscreens get different layer
|
||||
workspace()->updateClientLayer(this);
|
||||
updateLayer();
|
||||
|
||||
info->setState(isFullScreen() ? NET::FullScreen : NET::States(), NET::FullScreen);
|
||||
updateDecoration(false, false);
|
||||
|
|
Loading…
Reference in a new issue