diff --git a/abstract_client.cpp b/abstract_client.cpp index f125ec7262..c44f0b0deb 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -3116,4 +3116,50 @@ QSize AbstractClient::adjustedSize() const return sizeForClientSize(clientSize()); } +/** + * Returns @c true if the AbstractClient can be shown in full screen mode; otherwise @c false. + * + * Default implementation returns @c false. + */ +bool AbstractClient::isFullScreenable() const +{ + return false; +} + +/** + * Returns @c true if the AbstractClient is currently being shown in full screen mode; otherwise @c false. + * + * A client in full screen mode occupies the entire screen with no window frame around it. + * + * Default implementation returns @c false. + */ +bool AbstractClient::isFullScreen() const +{ + return false; +} + +/** + * Returns whether requests initiated by the user to enter or leave full screen mode are honored. + * + * Default implementation returns @c false. + */ +bool AbstractClient::userCanSetFullScreen() const +{ + return false; +} + +/** + * Asks the AbstractClient to enter or leave full screen mode. + * + * Default implementation does nothing. + * + * @param set @c true if the AbstractClient has to be shown in full screen mode, otherwise @c false + * @param user @c true if the request is initiated by the user, otherwise @c false + */ +void AbstractClient::setFullScreen(bool set, bool user) +{ + Q_UNUSED(set) + Q_UNUSED(user) +} + } diff --git a/abstract_client.h b/abstract_client.h index 8bdfe35e03..ee32246f65 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -416,8 +416,8 @@ public: virtual bool isHiddenInternal() const = 0; // TODO: remove boolean trap virtual void hideClient(bool hide) = 0; - virtual bool isFullScreenable() const = 0; - virtual bool isFullScreen() const = 0; + virtual bool isFullScreenable() const; + virtual bool isFullScreen() const; // TODO: remove boolean trap virtual AbstractClient *findModal(bool allow_itself = false) = 0; virtual bool isTransient() const; @@ -484,7 +484,7 @@ public: bool isMinimized() const { return m_minimized; } - virtual void setFullScreen(bool set, bool user = true) = 0; + virtual void setFullScreen(bool set, bool user = true); virtual void setClientShown(bool shown); @@ -546,7 +546,7 @@ public: virtual bool isMaximizable() const = 0; virtual bool isMinimizable() const = 0; virtual QRect iconGeometry() const; - virtual bool userCanSetFullScreen() const = 0; + virtual bool userCanSetFullScreen() const; virtual bool userCanSetNoBorder() const = 0; virtual void checkNoBorder(); virtual void setOnActivities(QStringList newActivitiesList); diff --git a/internal_client.cpp b/internal_client.cpp index 76b45f5730..06015c5f34 100644 --- a/internal_client.cpp +++ b/internal_client.cpp @@ -208,16 +208,6 @@ bool InternalClient::isCloseable() const return true; } -bool InternalClient::isFullScreenable() const -{ - return false; -} - -bool InternalClient::isFullScreen() const -{ - return false; -} - bool InternalClient::isMaximizable() const { return false; @@ -397,17 +387,6 @@ void InternalClient::takeFocus() { } -bool InternalClient::userCanSetFullScreen() const -{ - return false; -} - -void InternalClient::setFullScreen(bool set, bool user) -{ - Q_UNUSED(set) - Q_UNUSED(user) -} - void InternalClient::setNoBorder(bool set) { if (!userCanSetNoBorder()) { diff --git a/internal_client.h b/internal_client.h index 140e87d69f..57204a846b 100644 --- a/internal_client.h +++ b/internal_client.h @@ -53,8 +53,6 @@ public: QByteArray windowRole() const override; void closeWindow() override; bool isCloseable() const override; - bool isFullScreenable() const override; - bool isFullScreen() const override; bool isMaximizable() const override; bool isMinimizable() const override; bool isMovable() const override; @@ -82,8 +80,6 @@ public: AbstractClient *findModal(bool allow_itself = false) override; void setOnAllActivities(bool set) override; void takeFocus() override; - bool userCanSetFullScreen() const override; - void setFullScreen(bool set, bool user = true) override; void setNoBorder(bool set) override; void updateDecoration(bool check_workspace_pos, bool force = false) override; void updateColorScheme() override;