diff options
author | Liang Qi <liang.qi@qt.io> | 2019-04-16 09:34:50 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-04-16 09:34:50 +0200 |
commit | 9d67bf6e9635505bd9523a3007f8e531f890c88f (patch) | |
tree | a4b8a21313b4ac66bb1e96d90504a001863e2f22 /src/gui/kernel | |
parent | 12b96dbb81a1a7bc5ffc08c24942038b007985e9 (diff) | |
parent | 5b3dfa470ed7ea40103daa785286ab71fb7aa230 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
src/corelib/tools/qlocale.qdoc
tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I88e0757b2d020f0a244714c87844631df4b3fd13
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qoffscreensurface.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qoffscreensurface.cpp b/src/gui/kernel/qoffscreensurface.cpp index ae027af627..0cc11ca3bb 100644 --- a/src/gui/kernel/qoffscreensurface.cpp +++ b/src/gui/kernel/qoffscreensurface.cpp @@ -46,6 +46,8 @@ #include "qwindow.h" #include "qplatformwindow.h" +#include <private/qwindow_p.h> + QT_BEGIN_NAMESPACE /*! @@ -199,12 +201,18 @@ void QOffscreenSurface::create() if (QThread::currentThread() != qGuiApp->thread()) qWarning("Attempting to create QWindow-based QOffscreenSurface outside the gui thread. Expect failures."); d->offscreenWindow = new QWindow(d->screen); + // Make the window frameless to prevent Windows from enlarging it, should it + // violate the minimum title bar width on the platform. + d->offscreenWindow->setFlags(d->offscreenWindow->flags() + | Qt::CustomizeWindowHint | Qt::FramelessWindowHint); d->offscreenWindow->setObjectName(QLatin1String("QOffscreenSurface")); // Remove this window from the global list since we do not want it to be destroyed when closing the app. // The QOffscreenSurface has to be usable even after exiting the event loop. QGuiApplicationPrivate::window_list.removeOne(d->offscreenWindow); d->offscreenWindow->setSurfaceType(QWindow::OpenGLSurface); d->offscreenWindow->setFormat(d->requestedFormat); + // Prevent QPlatformWindow::initialGeometry() and platforms from setting a default geometry. + qt_window_private(d->offscreenWindow)->setAutomaticPositionAndResizeEnabled(false); d->offscreenWindow->setGeometry(0, 0, d->size.width(), d->size.height()); d->offscreenWindow->create(); } |