summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/offscreen
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/offscreen')
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration.cpp4
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenwindow.cpp7
2 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
index 56e6075cb2..0c39950019 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
@@ -49,7 +49,7 @@
#include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h>
#endif
#elif defined(Q_OS_WIN)
-#include <QtFontDatabaseSupport/private/qbasicfontdatabase_p.h>
+#include <QtFontDatabaseSupport/private/qfreetypefontdatabase_p.h>
#ifndef Q_OS_WINRT
#include <QtCore/private/qeventdispatcher_win_p.h>
#else
@@ -103,7 +103,7 @@ QOffscreenIntegration::QOffscreenIntegration()
m_fontDatabase.reset(new QGenericUnixFontDatabase());
#endif
#elif defined(Q_OS_WIN)
- m_fontDatabase.reset(new QBasicFontDatabase());
+ m_fontDatabase.reset(new QFreeTypeFontDatabase());
#endif
#ifndef QT_NO_DRAGANDDROP
diff --git a/src/plugins/platforms/offscreen/qoffscreenwindow.cpp b/src/plugins/platforms/offscreen/qoffscreenwindow.cpp
index c37d869597..832e94034d 100644
--- a/src/plugins/platforms/offscreen/qoffscreenwindow.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenwindow.cpp
@@ -157,10 +157,13 @@ QMargins QOffscreenWindow::frameMargins() const
void QOffscreenWindow::setFrameMarginsEnabled(bool enabled)
{
- if (enabled && !(window()->flags() & Qt::FramelessWindowHint))
+ if (enabled
+ && !(window()->flags() & Qt::FramelessWindowHint)
+ && (parent() == nullptr)) {
m_margins = QMargins(2, 2, 2, 2);
- else
+ } else {
m_margins = QMargins(0, 0, 0, 0);
+ }
}
void QOffscreenWindow::setWindowState(Qt::WindowStates state)