Add border(Left|Top|Right|Bottom)() const as virtual methods in AbstractClient

At some future point we will also need it in ShellClient and it allows us
to better share geometry related implementations.

Base implementation returns 0, that is no border.
This commit is contained in:
Martin Gräßlin 2015-10-12 12:00:33 +02:00
parent e121d4a107
commit acb3a14200
3 changed files with 28 additions and 4 deletions

View file

@ -1008,4 +1008,24 @@ AbstractClient::QuickTileMode AbstractClient::quickTileMode() const
return QuickTileNone;
}
int AbstractClient::borderBottom() const
{
return 0;
}
int AbstractClient::borderLeft() const
{
return 0;
}
int AbstractClient::borderRight() const
{
return 0;
}
int AbstractClient::borderTop() const
{
return 0;
}
}

View file

@ -528,6 +528,10 @@ protected:
// geometry handling
void checkOffscreenPosition(QRect *geom, const QRect &screenArea);
virtual int borderLeft() const;
virtual int borderRight() const;
virtual int borderTop() const;
virtual int borderBottom() const;
private:
void handlePaletteChange();

View file

@ -565,10 +565,10 @@ Q_SIGNALS:
void maximizeableChanged(bool);
private:
int borderLeft() const;
int borderRight() const;
int borderTop() const;
int borderBottom() const;
int borderLeft() const override;
int borderRight() const override;
int borderTop() const override;
int borderBottom() const override;
void exportMappingState(int s); // ICCCM 4.1.3.1, 4.1.4, NETWM 2.5.1
bool isManaged() const; ///< Returns false if this client is not yet managed
void updateAllowedActions(bool force = false);