1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-09 16:58:16 +03:00

Opt out of fixed window positions on Wayland

Latte dock is using PlasmaQuick::Dialog and can load applets that use
PlasmaQuick::Dialog, which uses QWindow::position to cache the position
where the window is requested to be, so we need to opt out of this
Qt behavior.
BUG=461856
This commit is contained in:
David Redondo 2022-11-16 09:32:15 +01:00
parent 8588614fbf
commit 1d468a94e9

View File

@ -73,9 +73,11 @@ int main(int argc, char **argv)
QQuickWindow::setDefaultAlphaBuffer(true);
qputenv("QT_WAYLAND_DISABLE_FIXED_POSITIONS", {});
const bool qpaVariable = qEnvironmentVariableIsSet("QT_QPA_PLATFORM");
detectPlatform(argc, argv);
QApplication app(argc, argv);
qunsetenv("QT_WAYLAND_DISABLE_FIXED_POSITIONS");
if (!qpaVariable) {
// don't leak the env variable to processes we start