Drop CoordinateMode from Client::layoutDecorationRects
It's unused without the padding.
This commit is contained in:
parent
a903fb2c64
commit
2b20aa8bd0
9 changed files with 14 additions and 19 deletions
|
@ -582,7 +582,7 @@ void Client::triggerDecorationRepaint()
|
|||
}
|
||||
}
|
||||
|
||||
void Client::layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom, Client::CoordinateMode mode) const
|
||||
void Client::layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const
|
||||
{
|
||||
if (!m_decoration) {
|
||||
return;
|
||||
|
|
6
client.h
6
client.h
|
@ -608,11 +608,7 @@ public:
|
|||
|
||||
Position titlebarPosition() const;
|
||||
|
||||
enum CoordinateMode {
|
||||
DecorationRelative, // Relative to the top left corner of the decoration
|
||||
WindowRelative // Relative to the top left corner of the window
|
||||
};
|
||||
void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom, CoordinateMode mode) const;
|
||||
void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const;
|
||||
|
||||
QWeakPointer<TabBox::TabBoxClientImpl> tabBoxClient() const {
|
||||
return m_tabBoxClient.toWeakRef();
|
||||
|
|
|
@ -113,7 +113,7 @@ void X11Renderer::render()
|
|||
}
|
||||
|
||||
QRect left, top, right, bottom;
|
||||
client()->client()->layoutDecorationRects(left, top, right, bottom, Client::DecorationRelative);
|
||||
client()->client()->layoutDecorationRects(left, top, right, bottom);
|
||||
|
||||
const QRect geometry = scheduled.boundingRect();
|
||||
left = left.intersected(geometry);
|
||||
|
|
|
@ -89,8 +89,7 @@ void Deleted::copyToDeleted(Toplevel* c)
|
|||
client->layoutDecorationRects(decoration_left,
|
||||
decoration_top,
|
||||
decoration_right,
|
||||
decoration_bottom,
|
||||
Client::WindowRelative);
|
||||
decoration_bottom);
|
||||
if (Decoration::DecoratedClientImpl *decoClient = client->decoratedClient()) {
|
||||
if (Decoration::Renderer *renderer = decoClient->renderer()) {
|
||||
m_decorationRenderer = renderer;
|
||||
|
@ -143,7 +142,7 @@ void Deleted::debug(QDebug& stream) const
|
|||
stream << "\'ID:" << window() << "\' (deleted)";
|
||||
}
|
||||
|
||||
void Deleted::layoutDecorationRects(QRect& left, QRect& top, QRect& right, QRect& bottom, int) const
|
||||
void Deleted::layoutDecorationRects(QRect& left, QRect& top, QRect& right, QRect& bottom) const
|
||||
{
|
||||
left = decoration_left;
|
||||
top = decoration_top;
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
bool noBorder() const {
|
||||
return no_border;
|
||||
}
|
||||
void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom, int unused = 0) const;
|
||||
void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const;
|
||||
QRect decorationRect() const;
|
||||
virtual Layer layer() const {
|
||||
return m_layer;
|
||||
|
|
|
@ -814,7 +814,7 @@ WindowQuadList Scene::Window::buildQuads(bool force) const
|
|||
bool isShadedClient = false;
|
||||
|
||||
if (client) {
|
||||
client->layoutDecorationRects(rects[0], rects[1], rects[2], rects[3], Client::WindowRelative);
|
||||
client->layoutDecorationRects(rects[0], rects[1], rects[2], rects[3]);
|
||||
isShadedClient = client->isShade() || center.isEmpty();
|
||||
}
|
||||
|
||||
|
|
|
@ -2056,7 +2056,7 @@ void SceneOpenGLDecorationRenderer::render()
|
|||
}
|
||||
|
||||
QRect left, top, right, bottom;
|
||||
client()->client()->layoutDecorationRects(left, top, right, bottom, Client::DecorationRelative);
|
||||
client()->client()->layoutDecorationRects(left, top, right, bottom);
|
||||
|
||||
const QRect geometry = scheduled.boundingRect();
|
||||
|
||||
|
@ -2085,7 +2085,7 @@ static int align(int value, int align)
|
|||
void SceneOpenGLDecorationRenderer::resizeTexture()
|
||||
{
|
||||
QRect left, top, right, bottom;
|
||||
client()->client()->layoutDecorationRects(left, top, right, bottom, Client::DecorationRelative);
|
||||
client()->client()->layoutDecorationRects(left, top, right, bottom);
|
||||
QSize size;
|
||||
|
||||
size.rwidth() = qMax(qMax(top.width(), bottom.width()),
|
||||
|
|
|
@ -452,7 +452,7 @@ void SceneQPainter::Window::renderWindowDecorations(QPainter *painter)
|
|||
renderer = r;
|
||||
}
|
||||
}
|
||||
client->layoutDecorationRects(dlr, dtr, drr, dbr, Client::WindowRelative);
|
||||
client->layoutDecorationRects(dlr, dtr, drr, dbr);
|
||||
noBorder = false;
|
||||
} else if (deleted && !deleted->noBorder()) {
|
||||
noBorder = false;
|
||||
|
@ -681,7 +681,7 @@ void SceneQPainterDecorationRenderer::render()
|
|||
void SceneQPainterDecorationRenderer::resizeImages()
|
||||
{
|
||||
QRect left, top, right, bottom;
|
||||
client()->client()->layoutDecorationRects(left, top, right, bottom, Client::DecorationRelative);
|
||||
client()->client()->layoutDecorationRects(left, top, right, bottom);
|
||||
|
||||
auto checkAndCreate = [this](int index, const QSize &size) {
|
||||
if (m_images[index].size() != size) {
|
||||
|
|
|
@ -733,13 +733,13 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
|
|||
}
|
||||
}
|
||||
noBorder = client->noBorder();
|
||||
client->layoutDecorationRects(dlr, dtr, drr, dbr, Client::WindowRelative);
|
||||
client->layoutDecorationRects(dlr, dtr, drr, dbr);
|
||||
}
|
||||
}
|
||||
if (deleted && !deleted->noBorder()) {
|
||||
renderer = static_cast<const SceneXRenderDecorationRenderer*>(deleted->decorationRenderer());
|
||||
noBorder = deleted->noBorder();
|
||||
deleted->layoutDecorationRects(dlr, dtr, drr, dbr, Client::WindowRelative);
|
||||
deleted->layoutDecorationRects(dlr, dtr, drr, dbr);
|
||||
}
|
||||
if (renderer) {
|
||||
left = renderer->picture(SceneXRenderDecorationRenderer::DecorationPart::Left);
|
||||
|
@ -1382,7 +1382,7 @@ void SceneXRenderDecorationRenderer::render()
|
|||
void SceneXRenderDecorationRenderer::resizePixmaps()
|
||||
{
|
||||
QRect left, top, right, bottom;
|
||||
client()->client()->layoutDecorationRects(left, top, right, bottom, Client::DecorationRelative);
|
||||
client()->client()->layoutDecorationRects(left, top, right, bottom);
|
||||
|
||||
xcb_connection_t *c = connection();
|
||||
auto checkAndCreate = [this, c](int border, const QRect &rect) {
|
||||
|
|
Loading…
Reference in a new issue