summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Vrátil <daniel.vratil@kdab.com>2016-11-03 10:30:12 +0100
committerDaniel Vrátil <daniel.vratil@kdab.com>2016-11-11 13:37:34 +0000
commita3c9550d7cef969298c43276cbfe92abb8578ce5 (patch)
tree67e23dcc3254148425455201f06eb47dc2312b66 /src
parentc877af847a588f958c1c7ed31ef138d44e6a9507 (diff)
QWindow::setFlags: return early if the flags didn't change
Prevents calling into QPlatformWindow::setWindowFlags() when there's no change. Change-Id: I2dccf3052b5895ee7f05623e6ed468be14bb0c0d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qwindow.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 91b5acbd35..ca29906fad 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -825,6 +825,9 @@ QSurfaceFormat QWindow::format() const
void QWindow::setFlags(Qt::WindowFlags flags)
{
Q_D(QWindow);
+ if (d->windowFlags == flags)
+ return;
+
if (d->platformWindow)
d->platformWindow->setWindowFlags(flags);
d->windowFlags = flags;