diff options
author | David Redondo <qt@david-redondo.de> | 2022-06-08 11:25:59 +0200 |
---|---|---|
committer | David Redondo <qt@david-redondo.de> | 2022-06-22 09:12:24 +0200 |
commit | a46795a22e05722917c6ebc60ed01bebf49898ae (patch) | |
tree | 34cfe15ef4e4d63fc4e685e947c177f1b4b8e302 /src/client/qwaylandintegration.cpp | |
parent | feae5bef02a4c9ce280f55d231890243b1783946 (diff) |
Keep toplevel windows in the top left corner of the screen
We can't know the actual position of a window on the screen. This causes
an issue when Widgets try to position a popup/menu absolutely and keep
it on the screen when the screen geometry doesn't include (0,0).
Instead report their positions always as the top left corner of
the screen that they are on.
This new behavior can be disabled for qt-shell or via an environment
variable by users that rely on the old behavior.
Fixes: QTBUG-85297
Change-Id: Iacb91cb03a0df87af950115760d2f41124ac06a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Diffstat (limited to 'src/client/qwaylandintegration.cpp')
-rw-r--r-- | src/client/qwaylandintegration.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp index 33d47e4ca..a874c55a3 100644 --- a/src/client/qwaylandintegration.cpp +++ b/src/client/qwaylandintegration.cpp @@ -86,6 +86,9 @@ QWaylandIntegration::QWaylandIntegration() return; } + QWaylandWindow::fixedToplevelPositions = + !qEnvironmentVariableIsSet("QT_WAYLAND_DISABLE_FIXED_POSITIONS"); + // ### Not ideal... // We don't want to use QPlatformWindow::requestActivate here, since that gives a warning // for most shells. Also, we don't want to put this into the specific shells that can use |