Commit 34df058e authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

Make support for the minimized state optional

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:
parent 4ec24bc4
......@@ -3162,4 +3162,14 @@ void AbstractClient::setFullScreen(bool set, bool 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;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment