Make support for the minimized state optional
Summary: In long term, we want to split XdgShellClient into several classes. One class for xdg-toplevel clients, and the other one for xdg-popup clients. xdg-popup clients are much simpler than xdg-toplevel clients, they can't be maximized or shown in full screen mode, they can't be interactively moved on the screen, and so on. In the end, we will have to plumb many pure virtual methods, which looks a bit ugly. This change makes support for the minimized state in AbstractClient optional so we don't have to add those no-op methods and keep code more or less "clean." Test Plan: Compiles. Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D27163
This commit is contained in:
parent
4ec24bc43f
commit
34df058e54
4 changed files with 11 additions and 7 deletions
|
@ -3162,4 +3162,14 @@ void AbstractClient::setFullScreen(bool set, bool user)
|
|||
Q_UNUSED(user)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns @c true if the AbstractClient can be minimized; otherwise @c false.
|
||||
*
|
||||
* Default implementation returns @c false.
|
||||
*/
|
||||
bool AbstractClient::isMinimizable() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -544,7 +544,7 @@ public:
|
|||
* Returns whether the window is maximizable or not.
|
||||
*/
|
||||
virtual bool isMaximizable() const = 0;
|
||||
virtual bool isMinimizable() const = 0;
|
||||
virtual bool isMinimizable() const;
|
||||
virtual QRect iconGeometry() const;
|
||||
virtual bool userCanSetFullScreen() const;
|
||||
virtual bool userCanSetNoBorder() const = 0;
|
||||
|
|
|
@ -213,11 +213,6 @@ bool InternalClient::isMaximizable() const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool InternalClient::isMinimizable() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool InternalClient::isMovable() const
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -54,7 +54,6 @@ public:
|
|||
void closeWindow() override;
|
||||
bool isCloseable() const override;
|
||||
bool isMaximizable() const override;
|
||||
bool isMinimizable() const override;
|
||||
bool isMovable() const override;
|
||||
bool isMovableAcrossScreens() const override;
|
||||
bool isResizable() const override;
|
||||
|
|
Loading…
Reference in a new issue