diff --git a/client.cpp b/client.cpp index a9dd52b2e0..f234794f7d 100644 --- a/client.cpp +++ b/client.cpp @@ -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; diff --git a/client.h b/client.h index 19693e942f..22246fdad5 100644 --- a/client.h +++ b/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 tabBoxClient() const { return m_tabBoxClient.toWeakRef(); diff --git a/decorations/decorationrenderer.cpp b/decorations/decorationrenderer.cpp index 7280f67617..ad9e46f966 100644 --- a/decorations/decorationrenderer.cpp +++ b/decorations/decorationrenderer.cpp @@ -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); diff --git a/deleted.cpp b/deleted.cpp index 4c349c9c20..c6cb2d4085 100644 --- a/deleted.cpp +++ b/deleted.cpp @@ -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; diff --git a/deleted.h b/deleted.h index 0a667b1cc7..54812aa9cc 100644 --- a/deleted.h +++ b/deleted.h @@ -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; diff --git a/scene.cpp b/scene.cpp index 7b97e75127..ab29a2e430 100644 --- a/scene.cpp +++ b/scene.cpp @@ -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(); } diff --git a/scene_opengl.cpp b/scene_opengl.cpp index d43d54a0dd..0b15ecbe5e 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -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()), diff --git a/scene_qpainter.cpp b/scene_qpainter.cpp index 3e55ecbe7c..7ed99e9116 100644 --- a/scene_qpainter.cpp +++ b/scene_qpainter.cpp @@ -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) { diff --git a/scene_xrender.cpp b/scene_xrender.cpp index 670fade570..b726a95b9c 100644 --- a/scene_xrender.cpp +++ b/scene_xrender.cpp @@ -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(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) {