Commit 3182c8f3 authored by Martin Flöser's avatar Martin Flöser

Implement AbstractClient::isFirstInTabBox

Moves implementation from Client to AbstractClient. Setter is protected,
getter is no longer virtual.
parent 4ac4a97c
......@@ -48,12 +48,14 @@ public:
QWeakPointer<TabBox::TabBoxClientImpl> tabBoxClient() const {
return m_tabBoxClient.toWeakRef();
}
bool isFirstInTabBox() const {
return m_firstInTabBox;
}
virtual void updateMouseGrab();
virtual QString caption(bool full = true, bool stripped = false) const = 0;
virtual bool isMinimized() const = 0;
virtual bool isCloseable() const = 0;
virtual bool isFirstInTabBox() const = 0;
// TODO: remove boolean trap
virtual bool isShown(bool shaded_is_shown) const = 0;
virtual bool wantsTabFocus() const = 0;
......@@ -165,11 +167,15 @@ public Q_SLOTS:
protected:
AbstractClient();
void setFirstInTabBox(bool enable) {
m_firstInTabBox = enable;
}
// TODO: remove boolean trap
virtual bool belongsToSameApplication(const AbstractClient *other, bool active_hack) const = 0;
private:
QSharedPointer<TabBox::TabBoxClientImpl> m_tabBoxClient;
bool m_firstInTabBox = false;
};
}
......
......@@ -131,7 +131,6 @@ Client::Client()
, pending_geometry_update(PendingGeometryNone)
, shade_geometry_change(false)
, sm_stacking_order(-1)
, m_firstInTabBox(false)
, electricMaximizing(false)
, activitiesDefined(false)
, needsSessionInteract(false)
......
......@@ -607,12 +607,6 @@ public:
void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const;
bool isFirstInTabBox() const override {
return m_firstInTabBox;
}
void setFirstInTabBox(bool enable) {
m_firstInTabBox = enable;
}
Xcb::Property fetchFirstInTabBox() const;
void readFirstInTabBox(Xcb::Property &property);
void updateFirstInTabBox();
......@@ -969,7 +963,6 @@ private:
int sm_stacking_order;
friend struct ResetupRulesProcedure;
friend class GeometryUpdatesBlocker;
bool m_firstInTabBox;
bool electricMaximizing;
QuickTileMode electricMode;
......
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