core: Drop Toplevel::bufferMargins()
It can be expressed via other means.
This commit is contained in:
parent
10a8ef2969
commit
242544a056
7 changed files with 2 additions and 35 deletions
|
@ -84,7 +84,6 @@ void Deleted::copyToDeleted(Toplevel* c)
|
|||
Q_ASSERT(dynamic_cast< Deleted* >(c) == nullptr);
|
||||
Toplevel::copyToDeleted(c);
|
||||
m_bufferGeometry = c->bufferGeometry();
|
||||
m_bufferMargins = c->bufferMargins();
|
||||
m_frameMargins = c->frameMargins();
|
||||
m_bufferScale = c->bufferScale();
|
||||
desk = c->desktop();
|
||||
|
@ -159,11 +158,6 @@ QRect Deleted::bufferGeometry() const
|
|||
return m_bufferGeometry;
|
||||
}
|
||||
|
||||
QMargins Deleted::bufferMargins() const
|
||||
{
|
||||
return m_bufferMargins;
|
||||
}
|
||||
|
||||
QMargins Deleted::frameMargins() const
|
||||
{
|
||||
return m_frameMargins;
|
||||
|
|
|
@ -33,7 +33,6 @@ public:
|
|||
void unrefWindow();
|
||||
void discard();
|
||||
QRect bufferGeometry() const override;
|
||||
QMargins bufferMargins() const override;
|
||||
QMargins frameMargins() const override;
|
||||
qreal bufferScale() const override;
|
||||
int desktop() const override;
|
||||
|
@ -183,7 +182,6 @@ private:
|
|||
void removeTransientFor(Deleted *parent);
|
||||
|
||||
QRect m_bufferGeometry;
|
||||
QMargins m_bufferMargins;
|
||||
QMargins m_frameMargins;
|
||||
|
||||
int delete_refcount;
|
||||
|
|
|
@ -904,14 +904,10 @@ QRegion Scene::Window::clientShape() const
|
|||
if (isShaded())
|
||||
return QRegion();
|
||||
|
||||
const QRect clipRect = toplevel->clientGeometry().translated(-toplevel->bufferGeometry().topLeft());
|
||||
const QRegion shape = bufferShape();
|
||||
const QMargins bufferMargins = toplevel->bufferMargins();
|
||||
if (bufferMargins.isNull()) {
|
||||
return shape;
|
||||
}
|
||||
|
||||
const QRect clippingRect = QRect(QPoint(0, 0), toplevel->bufferGeometry().size()) - toplevel->bufferMargins();
|
||||
return shape & clippingRect;
|
||||
return shape & clipRect;
|
||||
}
|
||||
|
||||
QRegion Scene::Window::decorationShape() const
|
||||
|
|
|
@ -810,11 +810,6 @@ bool Toplevel::isLocalhost() const
|
|||
return m_clientMachine->isLocal();
|
||||
}
|
||||
|
||||
QMargins Toplevel::bufferMargins() const
|
||||
{
|
||||
return QMargins();
|
||||
}
|
||||
|
||||
QMargins Toplevel::frameMargins() const
|
||||
{
|
||||
return QMargins();
|
||||
|
|
|
@ -305,16 +305,6 @@ public:
|
|||
* occupies on the screen, in global screen coordinates.
|
||||
*/
|
||||
virtual QRect bufferGeometry() const = 0;
|
||||
/**
|
||||
* Returns the extents of invisible portions in the pixmap.
|
||||
*
|
||||
* An X11 pixmap may contain invisible space around the actual contents of the
|
||||
* client. That space is reserved for server-side decoration, which we usually
|
||||
* want to skip when building contents window quads.
|
||||
*
|
||||
* Default implementation returns a margins object with all margins set to 0.
|
||||
*/
|
||||
virtual QMargins bufferMargins() const;
|
||||
/**
|
||||
* Returns the geometry of the Toplevel, excluding invisible portions, e.g.
|
||||
* server-side and client-side drop shadows, etc.
|
||||
|
|
|
@ -2619,11 +2619,6 @@ QRect X11Client::bufferGeometry() const
|
|||
return m_bufferGeometry;
|
||||
}
|
||||
|
||||
QMargins X11Client::bufferMargins() const
|
||||
{
|
||||
return QMargins(borderLeft(), borderTop(), borderRight(), borderBottom());
|
||||
}
|
||||
|
||||
QPoint X11Client::framePosToClientPos(const QPoint &point) const
|
||||
{
|
||||
int x = point.x();
|
||||
|
|
|
@ -82,7 +82,6 @@ public:
|
|||
|
||||
QRect inputGeometry() const override;
|
||||
QRect bufferGeometry() const override;
|
||||
QMargins bufferMargins() const override;
|
||||
|
||||
QPoint framePosToClientPos(const QPoint &point) const override;
|
||||
QPoint clientPosToFramePos(const QPoint &point) const override;
|
||||
|
|
Loading…
Reference in a new issue