Commit 53b87dbb authored by Martin Flöser's avatar Martin Flöser

Move (is|set)ElectricBorderMaximizing from Client to AbstractClient

parent 226a0993
......@@ -519,6 +519,10 @@ protected:
QuickTileMode electricBorderMode() const {
return m_electricMode;
}
void setElectricBorderMaximizing(bool maximizing);
bool isElectricBorderMaximizing() const {
return m_electricMaximizing;
}
QRect electricBorderMaximizeGeometry(QPoint pos, int desktop);
private:
......@@ -555,6 +559,7 @@ private:
// electric border/quick tiling
QuickTileMode m_electricMode = QuickTileNone;
bool m_electricMaximizing = false;
};
inline void AbstractClient::move(const QPoint& p, ForceGeometry_t force)
......
......@@ -125,7 +125,6 @@ Client::Client()
, pending_geometry_update(PendingGeometryNone)
, shade_geometry_change(false)
, sm_stacking_order(-1)
, electricMaximizing(false)
, m_electricMaximizingDelay(nullptr)
, activitiesDefined(false)
, needsSessionInteract(false)
......
......@@ -293,8 +293,6 @@ public:
void resizeWithChecks(int w, int h, ForceGeometry_t force = NormalGeometrySet) override;
void resizeWithChecks(int w, int h, xcb_gravity_t gravity, ForceGeometry_t force = NormalGeometrySet);
void resizeWithChecks(const QSize& s, xcb_gravity_t gravity, ForceGeometry_t force = NormalGeometrySet);
void setElectricBorderMaximizing(bool maximizing);
bool isElectricBorderMaximizing() const;
QSize sizeForClientSize(const QSize&, Sizemode mode = SizemodeAny, bool noframe = false) const;
/** Set the quick tile mode ("snap") of this window.
......@@ -757,7 +755,6 @@ private:
friend struct ResetupRulesProcedure;
friend class GeometryUpdatesBlocker;
bool electricMaximizing;
QTimer* m_electricMaximizingDelay;
friend bool performTransiencyCheck();
......
......@@ -2697,7 +2697,7 @@ void Client::finishMoveResize(bool cancel)
if (isElectricBorderMaximizing()) {
setQuickTileMode(electricBorderMode());
electricMaximizing = false;
setElectricBorderMaximizing(false);
} else if (!cancel) {
if (!(maximizeMode() & MaximizeHorizontal)) {
geom_restore.setX(geometry().x());
......@@ -3189,14 +3189,9 @@ void AbstractClient::setElectricBorderMode(QuickTileMode mode)
m_electricMode = mode;
}
bool Client::isElectricBorderMaximizing() const
void AbstractClient::setElectricBorderMaximizing(bool maximizing)
{
return electricMaximizing;
}
void Client::setElectricBorderMaximizing(bool maximizing)
{
electricMaximizing = maximizing;
m_electricMaximizing = maximizing;
if (maximizing)
outline()->show(electricBorderMaximizeGeometry(Cursor::pos(), desktop()));
else
......
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