summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDavid Edmundson <davidedmundson@kde.org>2019-04-11 03:58:06 +0100
committerDavid Edmundson <davidedmundson@kde.org>2019-04-11 12:51:52 +0000
commit5ef85a13da557e81a598f9a867817dfcba25ef98 (patch)
treec7c88685751c957b853304239f7067628a5a4d43 /src/plugins
parent0b10284a3589b37a9d639f3d1af4b1d641fbb6ab (diff)
Client: Avoid shadowing QPlatformWindow::windowGeometry
windowGeometry is an existing method in QPlatformWindow with an entirely different meaning to the newly added QWaylandWindow::windowGeometry. This led to the existing call in resizeFromApplyConfigure calling the wrong method. Change-Id: Ib344cf09178e77e5b4d5427325d840346663ec9d Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/decorations/bradient/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp
index 96ad261b2..e8e35775e 100644
--- a/src/plugins/decorations/bradient/main.cpp
+++ b/src/plugins/decorations/bradient/main.cpp
@@ -109,21 +109,21 @@ QWaylandBradientDecoration::QWaylandBradientDecoration()
QRectF QWaylandBradientDecoration::closeButtonRect() const
{
- const int windowRight = waylandWindow()->windowGeometry().right() + 1;
+ const int windowRight = waylandWindow()->windowContentGeometry().right() + 1;
return QRectF(windowRight - BUTTON_WIDTH - BUTTON_SPACING * 0 - BUTTONS_RIGHT_MARGIN,
(margins().top() - BUTTON_WIDTH) / 2, BUTTON_WIDTH, BUTTON_WIDTH);
}
QRectF QWaylandBradientDecoration::maximizeButtonRect() const
{
- const int windowRight = waylandWindow()->windowGeometry().right() + 1;
+ const int windowRight = waylandWindow()->windowContentGeometry().right() + 1;
return QRectF(windowRight - BUTTON_WIDTH * 2 - BUTTON_SPACING * 1 - BUTTONS_RIGHT_MARGIN,
(margins().top() - BUTTON_WIDTH) / 2, BUTTON_WIDTH, BUTTON_WIDTH);
}
QRectF QWaylandBradientDecoration::minimizeButtonRect() const
{
- const int windowRight = waylandWindow()->windowGeometry().right() + 1;
+ const int windowRight = waylandWindow()->windowContentGeometry().right() + 1;
return QRectF(windowRight - BUTTON_WIDTH * 3 - BUTTON_SPACING * 2 - BUTTONS_RIGHT_MARGIN,
(margins().top() - BUTTON_WIDTH) / 2, BUTTON_WIDTH, BUTTON_WIDTH);
}
@@ -136,7 +136,7 @@ QMargins QWaylandBradientDecoration::margins() const
void QWaylandBradientDecoration::paint(QPaintDevice *device)
{
bool active = window()->handle()->isActive();
- QRect wg = waylandWindow()->windowGeometry();
+ QRect wg = waylandWindow()->windowContentGeometry();
QRect clips[] =
{
QRect(wg.left(), wg.top(), wg.width(), margins().top()),
@@ -267,7 +267,7 @@ bool QWaylandBradientDecoration::handleMouse(QWaylandInputDevice *inputDevice, c
Q_UNUSED(global);
// Figure out what area mouse is in
- QRect wg = waylandWindow()->windowGeometry();
+ QRect wg = waylandWindow()->windowContentGeometry();
if (local.y() <= wg.top() + margins().top()) {
processMouseTop(inputDevice,local,b,mods);
} else if (local.y() > wg.bottom() - margins().bottom()) {
@@ -312,7 +312,7 @@ bool QWaylandBradientDecoration::handleTouch(QWaylandInputDevice *inputDevice, c
void QWaylandBradientDecoration::processMouseTop(QWaylandInputDevice *inputDevice, const QPointF &local, Qt::MouseButtons b, Qt::KeyboardModifiers mods)
{
- QRect wg = waylandWindow()->windowGeometry();
+ QRect wg = waylandWindow()->windowContentGeometry();
Q_UNUSED(mods);
if (local.y() <= wg.top() + margins().bottom()) {
if (local.x() <= margins().left()) {