Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.1
-
-
df8e1cc73 (dev), b87c8a325 (6.6), adb7e2525 (dev), 07839c11f (6.5), 061a057d5 (6.6), 0e4110aa6 (tqtc/lts-6.2), 154771b42 (6.5), 30990b0dc (tqtc/lts-6.2)
-
2023wk24FOQtforAndroid, 2023wk26FOQtforAndroid, 2023wk28FOQtforAndroid, 2023wk30FOQtforAndroid, 2023wk32FOQtforAndroid, 2023wk34FOQtforAndroid, 2023wk36FOQtforAndroid, 2023wk38FOQtforAndroid, 2023wk40FOQtforAndroid
Description
Consider a QQuickWindow in a fullscreen mode:
window()->setVisibility(QWindow::FullScreen);
Consider the MainActivity that extends QtActivity which sets layoutInDisplayCutoutMode to
LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT :
public class MainActivity extends org.qtproject.qt.android.bindings.QtActivity { @Override protected void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_NO_TITLE); //will hide the title WindowManager.LayoutParams attr = this.getWindow().getAttributes(); attr.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT; super.onCreate(savedInstanceState); } ... ...
Expected behaviour is (like in 6.5.0) the QQuickWindow occupies fullscreen except the display cut out area at the top.
Actual behaviour is the layoutInDisplayCutoutMode is getting set to LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES silently which is intern having an adverse effect on the output of getSafeInsetTop, which returns a greater value than the actual height of the displaycutout area or the actual safe inset top.
public int getSafeInsetTop() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { DisplayCutout displayCutout = this.getWindow().getDecorView().getRootWindowInsets().getDisplayCutout(); if (displayCutout != null) { return displayCutout.getSafeInsetTop(); } } return 0; }
The result of getSafeInsetTop is pushing the screen below when getSafeInsetTop is used to add a margin at the top, as window content is now overlapping with the status bar at top if top margin is not added.
Attachments
Issue Links
- relates to
-
QTBUG-110878 Fullscreen windows rendered behind navigation bar
- In Progress
-
QTBUG-46630 Full screen QDialog is shown incorrectly
- Open
-
QTBUG-98989 Android 11 - Display Cutout (Waterfall insets)
- Open
- resulted from
-
QTBUG-96877 Qt6 won't render into cutout area (regression)
- Closed