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());
|
qCWarning(KWIN_CORE, "%s doesn't support server side decorations", metaObject()->className());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AbstractClient::invalidateDecoration()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
bool AbstractClient::noBorder() const
|
bool AbstractClient::noBorder() const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -766,6 +766,7 @@ public:
|
||||||
* TODO: fix boolean traps
|
* TODO: fix boolean traps
|
||||||
*/
|
*/
|
||||||
virtual void updateDecoration(bool check_workspace_pos, bool force = false);
|
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,
|
* Returns whether the window provides context help or not. If it does,
|
||||||
|
|
|
@ -141,7 +141,7 @@ void DecorationBridge::initPlugin()
|
||||||
|
|
||||||
static void recreateDecorations()
|
static void recreateDecorations()
|
||||||
{
|
{
|
||||||
Workspace::self()->forEachAbstractClient([](AbstractClient *c) { c->updateDecoration(true, true); });
|
Workspace::self()->forEachAbstractClient([](AbstractClient *c) { c->invalidateDecoration(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecorationBridge::reconfigure()
|
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()
|
void InternalClient::destroyClient()
|
||||||
{
|
{
|
||||||
markAsZombie();
|
markAsZombie();
|
||||||
|
|
|
@ -54,6 +54,7 @@ public:
|
||||||
bool takeFocus() override;
|
bool takeFocus() override;
|
||||||
void setNoBorder(bool set) override;
|
void setNoBorder(bool set) override;
|
||||||
void updateDecoration(bool check_workspace_pos, bool force = false) override;
|
void updateDecoration(bool check_workspace_pos, bool force = false) override;
|
||||||
|
void invalidateDecoration() override;
|
||||||
void destroyClient() override;
|
void destroyClient() override;
|
||||||
bool hasPopupGrab() const override;
|
bool hasPopupGrab() const override;
|
||||||
void popupDone() override;
|
void popupDone() override;
|
||||||
|
|
|
@ -1110,6 +1110,11 @@ void X11Client::updateDecoration(bool check_workspace_pos, bool force)
|
||||||
updateFrameExtents();
|
updateFrameExtents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void X11Client::invalidateDecoration()
|
||||||
|
{
|
||||||
|
updateDecoration(true, true);
|
||||||
|
}
|
||||||
|
|
||||||
void X11Client::createDecoration(const QRect& oldgeom)
|
void X11Client::createDecoration(const QRect& oldgeom)
|
||||||
{
|
{
|
||||||
KDecoration2::Decoration *decoration = Decoration::DecorationBridge::self()->createDecoration(this);
|
KDecoration2::Decoration *decoration = Decoration::DecorationBridge::self()->createDecoration(this);
|
||||||
|
|
|
@ -183,6 +183,7 @@ public:
|
||||||
bool takeFocus() override;
|
bool takeFocus() override;
|
||||||
|
|
||||||
void updateDecoration(bool check_workspace_pos, bool force = false) override;
|
void updateDecoration(bool check_workspace_pos, bool force = false) override;
|
||||||
|
void invalidateDecoration() override;
|
||||||
|
|
||||||
void updateShape();
|
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
|
bool XdgToplevelClient::supportsWindowRules() const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -140,6 +140,7 @@ public:
|
||||||
bool noBorder() const override;
|
bool noBorder() const override;
|
||||||
void setNoBorder(bool set) override;
|
void setNoBorder(bool set) override;
|
||||||
void updateDecoration(bool check_workspace_pos, bool force = false) override;
|
void updateDecoration(bool check_workspace_pos, bool force = false) override;
|
||||||
|
void invalidateDecoration() override;
|
||||||
QString preferredColorScheme() const override;
|
QString preferredColorScheme() const override;
|
||||||
bool supportsWindowRules() const override;
|
bool supportsWindowRules() const override;
|
||||||
bool takeFocus() override;
|
bool takeFocus() override;
|
||||||
|
|
Loading…
Reference in a new issue