Move implementation for borderFoo() to AbstractClient

Also makes the methods no longer virtual, can just be provided in
AbstractClient.
remotes/origin/sebas/outputmanagement
Martin Gräßlin 10 years ago
parent a82daabfe9
commit 5d36bab6b2
  1. 28
      abstract_client.cpp
  2. 8
      abstract_client.h
  3. 12
      client.cpp
  4. 4
      client.h

@ -1053,25 +1053,17 @@ bool AbstractClient::isActiveFullScreen() const
return ac && (ac == this || ac->screen() != screen());
}
int AbstractClient::borderBottom() const
{
return 0;
}
int AbstractClient::borderLeft() const
{
return 0;
}
int AbstractClient::borderRight() const
{
return 0;
}
#define BORDER(which) \
int AbstractClient::border##which() const \
{ \
return isDecorated() ? decoration()->border##which() : 0; \
}
int AbstractClient::borderTop() const
{
return 0;
}
BORDER(Bottom)
BORDER(Left)
BORDER(Right)
BORDER(Top)
#undef BORDER
QSize AbstractClient::sizeForClientSize(const QSize &wsize, Sizemode mode, bool noframe) const
{

@ -626,10 +626,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;
int borderLeft() const;
int borderRight() const;
int borderTop() const;
int borderBottom() const;
virtual void changeMaximize(bool horizontal, bool vertical, bool adjust) = 0;
virtual void setGeometryRestore(const QRect &geo) = 0;
/**

@ -2146,18 +2146,6 @@ void Client::showOnScreenEdge()
xcb_delete_property(connection(), window(), atoms->kde_screen_edge_show);
}
#define BORDER(which) \
int Client::border##which() const \
{ \
return isDecorated() ? decoration()->border##which() : 0; \
}
BORDER(Bottom)
BORDER(Left)
BORDER(Right)
BORDER(Top)
#undef BORDER
QPointer<Decoration::DecoratedClientImpl> Client::decoratedClient() const
{
return m_decoratedClient;

@ -485,10 +485,6 @@ Q_SIGNALS:
void maximizeableChanged(bool);
private:
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);

Loading…
Cancel
Save