Commit 7ffc742a authored by Martin Flöser's avatar Martin Flöser

Move ::isCurrentTab to AbstractClient

Default implementation returns true.
parent 6feb1c66
......@@ -55,6 +55,11 @@ bool AbstractClient::untab(const QRect &toGeometry, bool clientRemoved)
return false;
}
bool AbstractClient::isCurrentTab() const
{
return true;
}
void AbstractClient::growHorizontal()
{
}
......
......@@ -37,6 +37,11 @@ class TabBoxClientImpl;
class AbstractClient : public Toplevel
{
Q_OBJECT
/**
* 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.
**/
Q_PROPERTY(bool isCurrentTab READ isCurrentTab)
public:
virtual ~AbstractClient();
......@@ -80,6 +85,7 @@ public:
virtual void setKeepBelow(bool) = 0;
virtual TabGroup *tabGroup() const;
Q_INVOKABLE virtual bool untab(const QRect &toGeometry = QRect(), bool clientRemoved = false);
virtual bool isCurrentTab() const;
virtual MaximizeMode maximizeMode() const = 0;
virtual void maximize(MaximizeMode) = 0;
virtual bool noBorder() const = 0;
......
......@@ -238,11 +238,6 @@ class Client
* The "Window Tabs" Group this Client belongs to.
**/
Q_PROPERTY(KWin::TabGroup* tabGroup READ tabGroup NOTIFY tabGroupChanged SCRIPTABLE false)
/**
* 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.
**/
Q_PROPERTY(bool isCurrentTab READ isCurrentTab)
/**
* Minimum size as specified in WM_NORMAL_HINTS
**/
......@@ -584,7 +579,7 @@ public:
* client, this function stops it.
*/
void dontMoveResize();
bool isCurrentTab() const;
bool isCurrentTab() const override;
/**
* Whether or not the window has a strut that expands through the invisible area of
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment