Add default handler for screen edge based activation
This change adds a default handle for screen edge based activation in order to reduce the amount of boilerplate in client sub-classes that do not support features such as auto-hiding, e.g. popups.
This commit is contained in:
parent
b36b3c67d1
commit
9a04442781
6 changed files with 6 additions and 11 deletions
|
@ -3474,4 +3474,9 @@ void AbstractClient::setNoBorder(bool set)
|
|||
qCWarning(KWIN_CORE, "%s doesn't support setting decorations", metaObject()->className());
|
||||
}
|
||||
|
||||
void AbstractClient::showOnScreenEdge()
|
||||
{
|
||||
qCWarning(KWIN_CORE, "%s doesn't support screen edge activation", metaObject()->className());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -764,7 +764,7 @@ public:
|
|||
* The AbstractClient also gets raised (e.g. Panel mode windows can cover) and the AbstractClient
|
||||
* gets informed in a window specific way that it is shown and raised again.
|
||||
*/
|
||||
virtual void showOnScreenEdge() = 0;
|
||||
virtual void showOnScreenEdge();
|
||||
|
||||
QByteArray desktopFileName() const {
|
||||
return m_desktopFileName;
|
||||
|
|
|
@ -384,10 +384,6 @@ void InternalClient::updateDecoration(bool check_workspace_pos, bool force)
|
|||
}
|
||||
}
|
||||
|
||||
void InternalClient::showOnScreenEdge()
|
||||
{
|
||||
}
|
||||
|
||||
void InternalClient::destroyClient()
|
||||
{
|
||||
markAsZombie();
|
||||
|
|
|
@ -65,7 +65,6 @@ public:
|
|||
bool takeFocus() override;
|
||||
void setNoBorder(bool set) override;
|
||||
void updateDecoration(bool check_workspace_pos, bool force = false) override;
|
||||
void showOnScreenEdge() override;
|
||||
void destroyClient() override;
|
||||
|
||||
void present(const QSharedPointer<QOpenGLFramebufferObject> fbo);
|
||||
|
|
|
@ -2012,10 +2012,6 @@ void XdgPopupClient::closeWindow()
|
|||
{
|
||||
}
|
||||
|
||||
void XdgPopupClient::showOnScreenEdge()
|
||||
{
|
||||
}
|
||||
|
||||
bool XdgPopupClient::supportsWindowRules() const
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -246,7 +246,6 @@ public:
|
|||
QRect transientPlacement(const QRect &bounds) const override;
|
||||
bool isCloseable() const override;
|
||||
void closeWindow() override;
|
||||
void showOnScreenEdge() override;
|
||||
bool wantsInput() const override;
|
||||
bool takeFocus() override;
|
||||
bool supportsWindowRules() const override;
|
||||
|
|
Loading…
Reference in a new issue