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
For Gerrit Dashboard: QTBUG-114437 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
501083,9 | Android: fix display cut mode being short edges always | dev | qt/qtbase | Status: MERGED | +2 | 0 |
501836,8 | Android: doc update for Known issue | dev | qt/qtdoc | Status: MERGED | +2 | 0 |
509254,2 | Android: doc update for Known issue | 6.6 | qt/qtdoc | Status: MERGED | +2 | 0 |
509435,2 | Android: doc update for Known issue | 6.5 | qt/qtdoc | Status: MERGED | +2 | 0 |
509512,2 | Android: fix display cut mode being short edges always | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
509541,2 | Android: doc update for Known issue | tqtc/lts-6.2 | qt/tqtc-qtdoc | Status: MERGED | +2 | 0 |
509557,2 | Android: fix display cut mode being short edges always | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
509795,2 | Android: fix display cut mode being short edges always | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |