Commit 3e9b722f authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Explicitly indicate support for window rules

This way it's more difficult to overlook the case where a new client
type unexpectedly advertises that it supports window rules.
parent cba895e7
......@@ -2747,7 +2747,7 @@ bool AbstractClient::isInternal() const
bool AbstractClient::supportsWindowRules() const
{
return true;
return false;
}
QMargins AbstractClient::frameMargins() const
......
......@@ -852,7 +852,7 @@ public:
/**
* Returns whether window rules can be applied to this client.
*
* Default implementation returns @c true.
* Default implementation returns @c false.
*/
virtual bool supportsWindowRules() const;
......
......@@ -38,7 +38,6 @@ public:
bool isMovable() const override { return false; }
bool isMovableAcrossScreens() const override { return false; }
bool acceptsFocus() const override { return false; }
bool supportsWindowRules() const override { return false; }
void closeWindow() override {}
bool takeFocus() override { return false; }
bool wantsInput() const override { return false; }
......
......@@ -321,11 +321,6 @@ void InternalClient::setFrameGeometry(const QRect &rect, ForceGeometry_t force)
}
}
bool InternalClient::supportsWindowRules() const
{
return false;
}
AbstractClient *InternalClient::findModal(bool allow_itself)
{
Q_UNUSED(allow_itself)
......
......@@ -59,7 +59,6 @@ public:
void hideClient(bool hide) override;
void resizeWithChecks(const QSize &size, ForceGeometry_t force = NormalGeometrySet) override;
void setFrameGeometry(const QRect &rect, ForceGeometry_t force = NormalGeometrySet) override;
bool supportsWindowRules() const override;
AbstractClient *findModal(bool allow_itself = false) override;
void setOnAllActivities(bool set) override;
bool takeFocus() override;
......
......@@ -4991,6 +4991,11 @@ void X11Client::applyWindowRules()
setBlockingCompositing(info->isBlockingCompositing());
}
bool X11Client::supportsWindowRules() const
{
return true;
}
void X11Client::damageNotifyEvent()
{
if (m_syncRequest.isPending && isResize()) {
......
......@@ -103,6 +103,7 @@ public:
Group* group() override;
void checkGroup(Group* gr = nullptr, bool force = false);
void changeClientLeaderGroup(Group* gr);
bool supportsWindowRules() const override;
void updateWindowRules(Rules::Types selection) override;
void applyWindowRules() override;
void updateFullscreenMonitors(NETFullscreenMonitors topology);
......
......@@ -2012,11 +2012,6 @@ void XdgPopupClient::closeWindow()
{
}
bool XdgPopupClient::supportsWindowRules() const
{
return false;
}
bool XdgPopupClient::wantsInput() const
{
return false;
......
......@@ -248,7 +248,6 @@ public:
void closeWindow() override;
bool wantsInput() const override;
bool takeFocus() override;
bool supportsWindowRules() const override;
void installPlasmaShellSurface(KWaylandServer::PlasmaShellSurfaceInterface *shellSurface) override;
protected:
......
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