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.
master
Vlad Zahorodnii 2020-08-20 14:31:48 +03:00
parent cba895e723
commit 3e9b722f8c
9 changed files with 8 additions and 15 deletions

View File

@ -2747,7 +2747,7 @@ bool AbstractClient::isInternal() const
bool AbstractClient::supportsWindowRules() const
{
return true;
return false;
}
QMargins AbstractClient::frameMargins() const

View File

@ -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;

View File

@ -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; }

View File

@ -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)

View File

@ -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;

View File

@ -4991,6 +4991,11 @@ void X11Client::applyWindowRules()
setBlockingCompositing(info->isBlockingCompositing());
}
bool X11Client::supportsWindowRules() const
{
return true;
}
void X11Client::damageNotifyEvent()
{
if (m_syncRequest.isPending && isResize()) {

View File

@ -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);

View File

@ -2012,11 +2012,6 @@ void XdgPopupClient::closeWindow()
{
}
bool XdgPopupClient::supportsWindowRules() const
{
return false;
}
bool XdgPopupClient::wantsInput() const
{
return false;

View File

@ -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: