Commit 74da0bb7 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

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.
parent 1c61de19
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment