Provide default implementation for AbstractClient::updateDecoration()
Not all client types support server-side decorations, for example it's typically the case for popup windows. This change provides a default implementation for the updateDecoration() method in order to reduce the amount of boilerplate code in client types that have no support for ssd.
This commit is contained in:
parent
1c61de1990
commit
74da0bb701
4 changed files with 8 additions and 8 deletions
|
@ -3451,4 +3451,11 @@ void AbstractClient::changeMaximize(bool horizontal, bool vertical, bool adjust)
|
|||
qCWarning(KWIN_CORE, "%s doesn't support setting maximized state", metaObject()->className());
|
||||
}
|
||||
|
||||
void AbstractClient::updateDecoration(bool check_workspace_pos, bool force)
|
||||
{
|
||||
Q_UNUSED(check_workspace_pos)
|
||||
Q_UNUSED(force)
|
||||
qCWarning(KWIN_CORE, "%s doesn't support server side decorations", metaObject()->className());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -723,7 +723,7 @@ public:
|
|||
/**
|
||||
* TODO: fix boolean traps
|
||||
*/
|
||||
virtual void updateDecoration(bool check_workspace_pos, bool force = false) = 0;
|
||||
virtual void updateDecoration(bool check_workspace_pos, bool force = false);
|
||||
|
||||
/**
|
||||
* Returns whether the window provides context help or not. If it does,
|
||||
|
|
|
@ -2027,12 +2027,6 @@ void XdgPopupClient::setNoBorder(bool set)
|
|||
Q_UNUSED(set)
|
||||
}
|
||||
|
||||
void XdgPopupClient::updateDecoration(bool check_workspace_pos, bool force)
|
||||
{
|
||||
Q_UNUSED(check_workspace_pos)
|
||||
Q_UNUSED(force)
|
||||
}
|
||||
|
||||
void XdgPopupClient::showOnScreenEdge()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -249,7 +249,6 @@ public:
|
|||
bool noBorder() const override;
|
||||
bool userCanSetNoBorder() const override;
|
||||
void setNoBorder(bool set) override;
|
||||
void updateDecoration(bool check_workspace_pos, bool force = false) override;
|
||||
void showOnScreenEdge() override;
|
||||
bool wantsInput() const override;
|
||||
bool takeFocus() override;
|
||||
|
|
Loading…
Reference in a new issue