move isFullScreenable to AbstractClient
REVIEW: 123871
This commit is contained in:
parent
a9f1f3d85e
commit
df1499784f
5 changed files with 26 additions and 13 deletions
|
@ -44,6 +44,17 @@ class DecorationPalette;
|
|||
class AbstractClient : public Toplevel
|
||||
{
|
||||
Q_OBJECT
|
||||
/**
|
||||
* Whether this Client is fullScreen. A Client might either be fullScreen due to the _NET_WM property
|
||||
* or through a legacy support hack. The fullScreen state can only be changed if the Client does not
|
||||
* use the legacy hack. To be sure whether the state changed, connect to the notify signal.
|
||||
**/
|
||||
Q_PROPERTY(bool fullScreen READ isFullScreen WRITE setFullScreen NOTIFY fullScreenChanged)
|
||||
/**
|
||||
* Whether the Client can be set to fullScreen. The property is evaluated each time it is invoked.
|
||||
* Because of that there is no notify signal.
|
||||
**/
|
||||
Q_PROPERTY(bool fullScreenable READ isFullScreenable)
|
||||
/**
|
||||
* Whether this Client is the currently visible Client in its Client Group (Window Tabs).
|
||||
* For change connect to the visibleChanged signal on the Client's Group.
|
||||
|
@ -176,6 +187,7 @@ public:
|
|||
virtual bool isCloseable() const = 0;
|
||||
// TODO: remove boolean trap
|
||||
virtual bool isShown(bool shaded_is_shown) const = 0;
|
||||
virtual bool isFullScreenable() const = 0;
|
||||
virtual bool isFullScreen() const = 0;
|
||||
// TODO: remove boolean trap
|
||||
virtual AbstractClient *findModal(bool allow_itself = false) = 0;
|
||||
|
@ -300,6 +312,7 @@ public Q_SLOTS:
|
|||
virtual void closeWindow() = 0;
|
||||
|
||||
Q_SIGNALS:
|
||||
void fullScreenChanged();
|
||||
void skipSwitcherChanged();
|
||||
void iconChanged();
|
||||
void activeChanged();
|
||||
|
|
15
client.h
15
client.h
|
@ -75,17 +75,6 @@ class Client
|
|||
: public AbstractClient
|
||||
{
|
||||
Q_OBJECT
|
||||
/**
|
||||
* Whether this Client is fullScreen. A Client might either be fullScreen due to the _NET_WM property
|
||||
* or through a legacy support hack. The fullScreen state can only be changed if the Client does not
|
||||
* use the legacy hack. To be sure whether the state changed, connect to the notify signal.
|
||||
**/
|
||||
Q_PROPERTY(bool fullScreen READ isFullScreen WRITE setFullScreen NOTIFY fullScreenChanged)
|
||||
/**
|
||||
* Whether the Client can be set to fullScreen. The property is evaluated each time it is invoked.
|
||||
* Because of that there is no notify signal.
|
||||
**/
|
||||
Q_PROPERTY(bool fullScreenable READ isFullScreenable)
|
||||
/**
|
||||
* The geometry of this Client. Be aware that depending on resize mode the geometryChanged signal
|
||||
* might be emitted at each resize step or only at the end of the resize operation.
|
||||
|
@ -295,7 +284,8 @@ public:
|
|||
|
||||
void setFullScreen(bool set, bool user = true) override;
|
||||
bool isFullScreen() const override;
|
||||
bool isFullScreenable(bool fullscreen_hack = false) const;
|
||||
bool isFullScreenable() const override;
|
||||
bool isFullScreenable(bool fullscreen_hack) const;
|
||||
bool isActiveFullScreen() const;
|
||||
bool userCanSetFullScreen() const override;
|
||||
QRect geometryFSRestore() const {
|
||||
|
@ -588,7 +578,6 @@ Q_SIGNALS:
|
|||
void clientStartUserMovedResized(KWin::Client*);
|
||||
void clientStepUserMovedResized(KWin::Client *, const QRect&);
|
||||
void clientFinishUserMovedResized(KWin::Client*);
|
||||
void fullScreenChanged();
|
||||
void transientChanged();
|
||||
void modalChanged();
|
||||
void moveResizedChanged();
|
||||
|
|
|
@ -2342,6 +2342,11 @@ void Client::changeMaximize(bool vertical, bool horizontal, bool adjust)
|
|||
emit quickTileModeChanged();
|
||||
}
|
||||
|
||||
bool Client::isFullScreenable() const
|
||||
{
|
||||
return isFullScreenable(false);
|
||||
}
|
||||
|
||||
bool Client::isFullScreenable(bool fullscreen_hack) const
|
||||
{
|
||||
if (!rules()->checkFullScreen(true))
|
||||
|
|
|
@ -214,6 +214,11 @@ bool ShellClient::isCloseable() const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool ShellClient::isFullScreenable() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ShellClient::isFullScreen() const
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -62,6 +62,7 @@ public:
|
|||
void closeWindow() override;
|
||||
AbstractClient *findModal(bool allow_itself = false) override;
|
||||
bool isCloseable() const override;
|
||||
bool isFullScreenable() const override;
|
||||
bool isFullScreen() const override;
|
||||
bool isMaximizable() const override;
|
||||
bool isMinimizable() const override;
|
||||
|
|
Loading…
Reference in a new issue