summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 098d0331327..741b089306e 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -243,6 +243,7 @@ static void initThemeHints()
touchDoubleTapDistance = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::TouchDoubleTapDistance).toInt();
}
+#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)
static bool checkNeedPortalSupport()
{
#if QT_CONFIG(dbus)
@@ -251,6 +252,7 @@ static bool checkNeedPortalSupport()
return false;
#endif // QT_CONFIG(dbus)
}
+#endif
// Using aggregate initialization instead of ctor so we can have a POD global static
#define Q_WINDOW_GEOMETRY_SPECIFICATION_INITIALIZER { Qt::TopLeftCorner, -1, -1, -1, -1 }
@@ -1349,11 +1351,13 @@ static void init_platform(const QString &pluginNamesWithArguments, const QString
themeNames.append(platformThemeName);
}
+#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)
// 2) Special case - check whether it's a flatpak or snap app to use xdg-desktop-portal platform theme for portals support
if (checkNeedPortalSupport()) {
qCDebug(lcQpaTheme) << "Adding xdgdesktopportal to list of theme names";
themeNames.append(QStringLiteral("xdgdesktopportal"));
}
+#endif
// 3) Ask the platform integration for a list of theme names
const auto platformIntegrationThemeNames = QGuiApplicationPrivate::platform_integration->themeNames();
@@ -3407,6 +3411,15 @@ void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::E
return;
QWindowPrivate *p = qt_window_private(window);
+ if (e->isExposed) {
+ // If the window has been automatically positioned or resized by the
+ // window manager, we now assume those have taken effect, even for
+ // asynchronous window managers. From this point on we want the window
+ // to keep its geometry, even when recreated.
+ p->positionAutomatic = false;
+ p->resizeAutomatic = false;
+ }
+
if (!p->receivedExpose) {
if (p->resizeEventPending) {
// as a convenience for plugins, send a resize event before the first expose event if they haven't done so