Invalidate decoration explicitly
Lets us to remove AbstractClient::updateDecoration().
This commit is contained in:
parent
01a46ff389
commit
70f46970da
9 changed files with 24 additions and 1 deletions
|
@ -3750,6 +3750,10 @@ void AbstractClient::updateDecoration(bool check_workspace_pos, bool force)
|
|||
qCWarning(KWIN_CORE, "%s doesn't support server side decorations", metaObject()->className());
|
||||
}
|
||||
|
||||
void AbstractClient::invalidateDecoration()
|
||||
{
|
||||
}
|
||||
|
||||
bool AbstractClient::noBorder() const
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -766,6 +766,7 @@ public:
|
|||
* TODO: fix boolean traps
|
||||
*/
|
||||
virtual void updateDecoration(bool check_workspace_pos, bool force = false);
|
||||
virtual void invalidateDecoration();
|
||||
|
||||
/**
|
||||
* Returns whether the window provides context help or not. If it does,
|
||||
|
|
|
@ -141,7 +141,7 @@ void DecorationBridge::initPlugin()
|
|||
|
||||
static void recreateDecorations()
|
||||
{
|
||||
Workspace::self()->forEachAbstractClient([](AbstractClient *c) { c->updateDecoration(true, true); });
|
||||
Workspace::self()->forEachAbstractClient([](AbstractClient *c) { c->invalidateDecoration(); });
|
||||
}
|
||||
|
||||
void DecorationBridge::reconfigure()
|
||||
|
|
|
@ -336,6 +336,11 @@ void InternalClient::updateDecoration(bool check_workspace_pos, bool force)
|
|||
}
|
||||
}
|
||||
|
||||
void InternalClient::invalidateDecoration()
|
||||
{
|
||||
updateDecoration(true, true);
|
||||
}
|
||||
|
||||
void InternalClient::destroyClient()
|
||||
{
|
||||
markAsZombie();
|
||||
|
|
|
@ -54,6 +54,7 @@ public:
|
|||
bool takeFocus() override;
|
||||
void setNoBorder(bool set) override;
|
||||
void updateDecoration(bool check_workspace_pos, bool force = false) override;
|
||||
void invalidateDecoration() override;
|
||||
void destroyClient() override;
|
||||
bool hasPopupGrab() const override;
|
||||
void popupDone() override;
|
||||
|
|
|
@ -1110,6 +1110,11 @@ void X11Client::updateDecoration(bool check_workspace_pos, bool force)
|
|||
updateFrameExtents();
|
||||
}
|
||||
|
||||
void X11Client::invalidateDecoration()
|
||||
{
|
||||
updateDecoration(true, true);
|
||||
}
|
||||
|
||||
void X11Client::createDecoration(const QRect& oldgeom)
|
||||
{
|
||||
KDecoration2::Decoration *decoration = Decoration::DecorationBridge::self()->createDecoration(this);
|
||||
|
|
|
@ -183,6 +183,7 @@ public:
|
|||
bool takeFocus() override;
|
||||
|
||||
void updateDecoration(bool check_workspace_pos, bool force = false) override;
|
||||
void invalidateDecoration() override;
|
||||
|
||||
void updateShape();
|
||||
|
||||
|
|
|
@ -814,6 +814,11 @@ void XdgToplevelClient::updateDecoration(bool check_workspace_pos, bool force)
|
|||
}
|
||||
}
|
||||
|
||||
void XdgToplevelClient::invalidateDecoration()
|
||||
{
|
||||
updateDecoration(true, true);
|
||||
}
|
||||
|
||||
bool XdgToplevelClient::supportsWindowRules() const
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -140,6 +140,7 @@ public:
|
|||
bool noBorder() const override;
|
||||
void setNoBorder(bool set) override;
|
||||
void updateDecoration(bool check_workspace_pos, bool force = false) override;
|
||||
void invalidateDecoration() override;
|
||||
QString preferredColorScheme() const override;
|
||||
bool supportsWindowRules() const override;
|
||||
bool takeFocus() override;
|
||||
|
|
Loading…
Reference in a new issue