summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2010-11-18 13:28:57 (GMT)
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2010-11-18 13:28:57 (GMT)
commit3b80b70d1464320aee2b38ddeb1ec0d257f6bd1c (patch)
tree96c27c61051fe89eeb50c131a6f5f8b893d83e82 /src/gui/kernel
parent7ee4208b6ff30b581ebb70bf9441b16ad44dfc77 (diff)
downloadQt-3b80b70d1464320aee2b38ddeb1ec0d257f6bd1c.zip
Qt-3b80b70d1464320aee2b38ddeb1ec0d257f6bd1c.tar.gz
Qt-3b80b70d1464320aee2b38ddeb1ec0d257f6bd1c.tar.bz2
Resolve two save/restore geometry issues on X11.
Reviewed-by: Brad 1: When restoring non-fullscreen geometry we would offset the position if the window was currently fullscreen. This seems wrong; the window geometry is set correctly without the offset. 2: QWidget::geometry() returns erroneous values after restoring old full-screen geometry . The window itself is positioned correctly on screen. This is a very minor use case, let it silently fail.
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index cd1c9f0..6bc699c 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -7066,13 +7066,8 @@ bool QWidget::restoreGeometry(const QByteArray &geometry)
setWindowState(ws);
d_func()->topData()->normalGeometry = restoredNormalGeometry;
} else {
- QPoint offset;
-#ifdef Q_WS_X11
- if (isFullScreen())
- offset = d_func()->topData()->fullScreenOffset;
-#endif
setWindowState(windowState() & ~(Qt::WindowMaximized | Qt::WindowFullScreen));
- move(restoredFrameGeometry.topLeft() + offset);
+ move(restoredFrameGeometry.topLeft());
resize(restoredNormalGeometry.size());
}
return true;