From f2fd22f0e9555c609d6d79a9e7a6f8718f9859b6 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Fri, 14 Aug 2020 14:33:21 +0300 Subject: qtwayland-config: Do not enable by default resize after swap env variable In our use-cases applications do not specify a size for the windows, leaving qtwayland itself to create an initial size for the surface (a 500 by 500 size). The compositor will send a configure event back to the application with the available/actual geometry area, resulting in resize performed by the application. This, in tandem with the fact that we tweaked qtwayland to perform the resize (due to SPEC-3334) after a buffer swap results in a short flicker -- the application does an initial commit with that initial size but with no background or any information attached to it. The environmental variable tunes the repainting mechanism in qtwayland affecting the way the resize is performed and was added when multiple or split surfaces are in use. Destroying one of them will not cause a scale back to the original area. We therefore disable by default that environment variable and leave it to the applications to enable it at start-up, if they still want to use split type of surfaces. Added a rather big comment about why that might necessary giving some clues and some mention that qtwayland doesn't make a distinction for the value of the environmental variable itself. Bug-AGL: SPEC-3522 Signed-off-by: Marius Vlad Change-Id: Ib0dcda6382dd52677a0768afe3948ab62955c9f8 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/25120 Reviewed-by: Jan-Simon Moeller Tested-by: Jan-Simon Moeller --- .../recipes-qt/qt5/qtwayland-config/qtwayland | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland-config/qtwayland') diff --git a/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland-config/qtwayland b/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland-config/qtwayland index 504af42b8..a371c6c4e 100644 --- a/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland-config/qtwayland +++ b/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland-config/qtwayland @@ -1,2 +1,12 @@ QT_WAYLAND_SHELL_INTEGRATION=@QT_WAYLAND_DEFAULT_SHELL@ -QT_WAYLAND_RESIZE_AFTER_SWAP=1 +# The following might be necessary when multiple/split surfaces are created. +# Without this, QtWayland will sometimes maintain the same/old size even if the +# split surface is destroyed. +# We keep it disabled by default as it causes an additional repaint of the +# surface until the compositor sends a configure event to scale the window to +# the actual area. Typical windows will, by default, have an initial size set +# by qtwayland when starting-up (without an explicit size specified by the +# application). +# Note that QtWayland will only test the presence of the environment variable +# so it will be enabled even if set to 0 +# QT_WAYLAND_RESIZE_AFTER_SWAP=1 -- cgit 1.2.3-korg