-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
- When switching from regular full-screen mode to multi-window (split or pop-up) mode, the webview display area is smaller than the actual window area, with white space appearing on the right and bottom. However, the touch area is based on the full screen area.
- When switching from multi-window mode to regular full-screen mode, the webview area (viewport) is larger than the actual window area, with the right and bottom areas cut off. The touch area is based on the normal display size.
Expected Behavior
The webview should display properly even when switching between multiple windows.
Steps with code example to reproduce
This has nothing to do with code structure.
Stacktrace/Logs
I/flutter (10406): MultiWindow mode check: isInMultiWindowMode=false, previous=true, isOnShift=true
I/InsetsController(10406): onStateChanged: host=.MainActivity, from=android.view.ViewRootImpl.onInsetsStateChanged:3011, state=InsetsState: {mDisplayFrame=Rect(0, 0 - 1968, 2184), mDisplayCutout=DisplayCutout{insets=Rect(0, 88 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(1450, 0 - 1520, 88), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=1968 displayHeight=2184 physicalDisplayWidth=1968 physicalDisplayHeight=2184 density={2.625} cutoutSpec={M 190.8571428571429,0 M 190.8571428571429,6.857142857142857 a 13.33333333333333,13.33333333333333 0 1,0 0,26.66666666666667 a 13.33333333333333,13.33333333333333 0 1,0 0,-26.66666666666667 z @dp} rotation={0} scale={1.0} physicalPixelDisplaySizeRatio={1.0}}} sideOverrides={}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=11, center=Point(11, 11)}, RoundedCorner{position=TopRight, radius=11, center=Point(1957, 11)}, RoundedCorner{position=BottomRight, radius=11, center=Point(1957, 2173)}, RoundedCorner{position=BottomLeft, radius=11, center=Point(11, 2173)}]} mRoundedCornerFrame=Rect(0, 0 - 1968, 2184), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(1869, 0 - 1968, 89) rotation=0}, mDisplayShape=DisplayShape{ spec=-311912193 displayWidth=1968 displayHeight=2184 physicalPixelDisplaySizeRatio=1.0 rotation=0 offsetX=0 offsetY=0 scale=1.0}, mSources= { InsetsSource: {d51c0000 mType=statusBars mFrame=[0,0][1968,89] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null}, InsetsSource: {d51c0005 mType=mandatorySystemGestures mFrame=[0,0][1968,89] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null}, InsetsSource: {d51c0006 mType=tappableElement mFrame=[0,0][1968,89] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null}, InsetsSource: {e43b0001 mType=navigationBars mFrame=[0,2076][1968,2184] mVisible=true mFlags= mSideHint=BOTTOM mBoundingRects=null}, InsetsSource: {e43b0004 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {e43b0005 mType=mandatorySystemGestures mFrame=[0,2076][1968,2184] mVisible=true mFlags= mSideHint=BOTTOM mBoundingRects=null}, InsetsSource: {e43b0006 mType=tappableElement mFrame=[0,2076][1968,2184] mVisible=true mFlags= mSideHint=BOTTOM mBoundingRects=null}, InsetsSource: {e43b0024 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {e7500004 mType=systemGestures mFrame=[0,0][0,0] mVisible=false mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {e7500005 mType=mandatorySystemGestures mFrame=[0,0][0,0] mVisible=false mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {e7500006 mType=tappableElement mFrame=[0,0][0,0] mVisible=false mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {e7500024 mType=systemGestures mFrame=[0,0][0,0] mVisible=false mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {3 mType=ime mFrame=[0,0][0,0] mVisible=false mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {52130002 mType=captionBar mFrame=[341,408][1642,444] mVisible=true mFlags=FORCE_CONSUMING|FORCE_CONSUMING_OPAQUE_CAPTION_BAR|FLAG_CONSUMING_CAPTION_INSET_HANDLE mSideHint=TOP mBoundingRects=null}, InsetsSource: {52130005 mType=mandatorySystemGestures mFrame=[341,408][1642,444] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null} }
I/VRI[MainActivity]@7ffd073(10406): handleResized, frames=ClientWindowFrames{frame=[0,0][1968,2184] display=[0,0][1968,2184] parentFrame=[0,0][0,0]} displayId=0 dragResizing=false compatScale=1.0 frameChanged=true attachedFrameChanged=false configChanged=true displayChanged=false compatScaleChanged=false dragResizingChanged=false
I/VRI[MainActivity]@7ffd073(10406): handleResized mSyncSeqId = 0
D/VRI[MainActivity]@7ffd073(10406): reportNextDraw android.view.ViewRootImpl.handleResized:2968 android.view.ViewRootImpl.-$$Nest$mhandleResized:0 android.view.ViewRootImpl$W.resized:13993 android.app.servertransaction.WindowStateResizeItem.execute:93 android.app.servertransaction.WindowStateTransactionItem.execute:62
I/InsetsSourceConsumer(10406): applyRequestedVisibilityToControl: visible=true, type=navigationBars, host=.MainActivity
I/InsetsSourceConsumer(10406): applyRequestedVisibilityToControl: visible=true, type=statusBars, host=.MainActivity
I/BLASTBufferQueue_Java(10406): update, w= 1968 h= 2184 mName = VRI[MainActivity]@7ffd073 mNativeObject= 0xb4000077d2540f80 sc.mNativeObject= 0xb4000078424968d0 format= -3 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3559 android.view.ViewRootImpl.relayoutWindow:11614 android.view.ViewRootImpl.performTraversals:4755 android.view.ViewRootImpl.doTraversal:3904 android.view.ViewRootImpl$TraversalRunnable.run:12819 android.view.Choreographer$CallbackRecord.run:1901
I/VRI[MainActivity]@7ffd073(10406): Relayout returned: old=(0,0,1968,2184) new=(0,0,1968,2184) relayoutAsync=false req=(1968,2184)0 dur=2 res=0x200001 s={true 0xb4000078c249eae0} ch=false seqId=0
D/VRI[MainActivity]@7ffd073(10406): mThreadedRenderer.updateSurface() mSurface={isValid=true 0xb4000078c249eae0}
I/VRI[MainActivity]@7ffd073(10406): updateBoundsLayer: t=android.view.SurfaceControl$Transaction@b27b8fd sc=Surface(name=Bounds for - .MainActivity@0)/@0xaf509f2 frame=924
I/SurfaceView(10406): 94664830 Changes: creating=false format=false size=true visible=false alpha=false hint=false left=false top=false z=false attached=true lifecycleStrategy=false
I/SurfaceView(10406): 94664830 Cur surface: Surface(name=null mNativeObject=-5476376628226788848)/@0x59bf165
D/SurfaceComposerClient(10406): setCornerRadius ## 5a4787e SurfaceView[.MainActivity]@0#2892 cornerRadius=0.000000
I/BLASTBufferQueue_Java(10406): update, w= 1968 h= 2148 mName = 5a4787e SurfaceView[.MainActivity]@0 mNativeObject= 0xb4000077d24b0680 sc.mNativeObject= 0xb400007842483010 format= 4 caller= android.view.SurfaceView.setBufferSize:1703 android.view.SurfaceView.performSurfaceTransaction:1238 android.view.SurfaceView.updateSurface:1467 android.view.SurfaceView.setFrame:716 android.view.View.layout:26931 android.widget.FrameLayout.layoutChildren:345
I/SV94664830 MainActivity: pST: sr = Rect(0, 36 - 1968, 2184) sw = 1968 sh = 2148
D/SurfaceView(10406): 94664830 performSurfaceTransaction RenderWorker position = [0, 36, 1968, 2184] surfaceSize = 1968x2148
I/SV94664830 MainActivity: updateSurface: mVisible = true mSurface.isValid() = true
I/SV94664830 MainActivity: updateSurface: mSurfaceCreated = true surfaceChanged = false visibleChanged = false
I/SurfaceView(10406): 94664830 surfaceChanged -- format=4 w=1968 h=2148
I/SV94664830 MainActivity: surfaceChanged (1968,2148) 1 #5 io.flutter.embedding.android.FlutterSurfaceView{5a4787e V.E...... ......ID 0,0-1968,2148}
I/SurfaceView(10406): 94664830 surfaceRedrawNeeded
I/SurfaceView(10406): 94664830 finishedDrawing
V/SurfaceView(10406): Layout: x=0 y=36 w=1968 h=2148, frame=Rect(0, 0 - 1968, 2148)
W/libc (10406): Access denied finding property "vendor.gpp.create_frc_extension"
W/libc (10406): Access denied finding property "vendor.gpp.create_frc_extension"
D/VRI[MainActivity]@7ffd073(10406): reportNextDraw android.view.ViewRootImpl.performTraversals:5394 android.view.ViewRootImpl.doTraversal:3904 android.view.ViewRootImpl$TraversalRunnable.run:12819 android.view.Choreographer$CallbackRecord.run:1901 android.view.Choreographer$CallbackRecord.run:1910
D/VRI[MainActivity]@7ffd073(10406): Setup new sync=wmsSync-VRI[MainActivity]@7ffd073#61
I/VRI[MainActivity]@7ffd073(10406): Creating new active sync group VRI[MainActivity]@7ffd073#62
D/VRI[MainActivity]@7ffd073(10406): registerCallbacksForSync syncBuffer=false
I/View (10406): setRequestedFrameRate frameRate=-4.0, this=com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebView{e068453 VFEDHVCL. .F...... 0,0-1300,1235 aid=1073741824}, caller=android.view.ViewGroup.setRequestedFrameRate:9947 WV.Z6.b:1 WV.z7.g:118 WV.z7.onDraw:7 com.android.webview.chromium.WebViewChromium.onDraw:35
D/SurfaceView(10406): 94664830 updateSurfacePosition RenderWorker, frameNr = 924, position = [0, 36, 1968, 2184] surfaceSize = 1968x2148
I/SV94664830 MainActivity: uSP: rtp = Rect(0, 36 - 1968, 2184) rtsw = 1968 rtsh = 2148
I/SV94664830 MainActivity: onSSPAndSRT: pl = 0 pt = 36 sx = 1.0 sy = 1.0
I/SV94664830 MainActivity: aOrMT: VRI[MainActivity]@7ffd073 t = android.view.SurfaceControl$Transaction@407bd0a fN = 924 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1932 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:401
I/VRI[MainActivity]@7ffd073(10406): mWNT: t=0xb4000079b24f7150 mBlastBufferQueue=0xb4000077d2540f80 fn= 924 HdrRenderState mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1863 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1932
D/VRI[MainActivity]@7ffd073(10406): Received frameDrawingCallback syncResult=0 frameNum=924.
I/VRI[MainActivity]@7ffd073(10406): mWNT: t=0xb4000079b24fb910 mBlastBufferQueue=0xb4000077d2540f80 fn= 924 HdrRenderState mRenderHdrSdrRatio=1.0 caller= android.view.ViewRootImpl$12.onFrameDraw:15352 android.view.ThreadedRenderer$1.onFrameDraw:718
I/VRI[MainActivity]@7ffd073(10406): Setting up sync and frameCommitCallback
I/VRI[MainActivity]@7ffd073(10406): Received frameCommittedCallback lastAttemptedDrawFrameNum=924 didProduceBuffer=true
D/VRI[MainActivity]@7ffd073(10406): reportDrawFinished seqId=0
I/View (10406): setRequestedFrameRate frameRate=-4.0, this=com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebView{e068453 VFEDHVCL. .F...... 0,0-1968,2148 aid=1073741824}, caller=android.view.ViewGroup.setRequestedFrameRate:9947 WV.Z6.b:1 WV.z7.g:118 WV.z7.onDraw:7 com.android.webview.chromium.WebViewChromium.onDraw:35
I/InsetsController(10406): onStateChanged: host=.MainActivity, from=android.view.ViewRootImpl.onInsetsStateChanged:3011, state=InsetsState: {mDisplayFrame=Rect(0, 0 - 1968, 2184), mDisplayCutout=DisplayCutout{insets=Rect(0, 88 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(1450, 0 - 1520, 88), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=1968 displayHeight=2184 physicalDisplayWidth=1968 physicalDisplayHeight=2184 density={2.625} cutoutSpec={M 190.8571428571429,0 M 190.8571428571429,6.857142857142857 a 13.33333333333333,13.33333333333333 0 1,0 0,26.66666666666667 a 13.33333333333333,13.33333333333333 0 1,0 0,-26.66666666666667 z @dp} rotation={0} scale={1.0} physicalPixelDisplaySizeRatio={1.0}}} sideOverrides={}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=11, center=Point(11, 11)}, RoundedCorner{position=TopRight, radius=11, center=Point(1957, 11)}, RoundedCorner{position=BottomRight, radius=11, center=Point(1957, 2173)}, RoundedCorner{position=BottomLeft, radius=11, center=Point(11, 2173)}]} mRoundedCornerFrame=Rect(0, 0 - 1968, 2184), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(1869, 0 - 1968, 89) rotation=0}, mDisplayShape=DisplayShape{ spec=-311912193 displayWidth=1968 displayHeight=2184 physicalPixelDisplaySizeRatio=1.0 rotation=0 offsetX=0 offsetY=0 scale=1.0}, mSources= { InsetsSource: {d51c0000 mType=statusBars mFrame=[0,0][1968,89] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null}, InsetsSource: {d51c0005 mType=mandatorySystemGestures mFrame=[0,0][1968,89] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null}, InsetsSource: {d51c0006 mType=tappableElement mFrame=[0,0][1968,89] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null}, InsetsSource: {e43b0001 mType=navigationBars mFrame=[0,2076][1968,2184] mVisible=true mFlags= mSideHint=BOTTOM mBoundingRects=null}, InsetsSource: {e43b0004 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {e43b0005 mType=mandatorySystemGestures mFrame=[0,2076][1968,2184] mVisible=true mFlags= mSideHint=BOTTOM mBoundingRects=null}, InsetsSource: {e43b0006 mType=tappableElement mFrame=[0,2076][1968,2184] mVisible=true mFlags= mSideHint=BOTTOM mBoundingRects=null}, InsetsSource: {e43b0024 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {e7500004 mType=systemGestures mFrame=[0,0][0,0] mVisible=false mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {e7500005 mType=mandatorySystemGestures mFrame=[0,0][0,0] mVisible=false mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {e7500006 mType=tappableElement mFrame=[0,0][0,0] mVisible=false mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {e7500024 mType=systemGestures mFrame=[0,0][0,0] mVisible=false mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {3 mType=ime mFrame=[0,0][0,0] mVisible=false mFlags= mSideHint=NONE mBoundingRects=null} }
I/VRI[MainActivity]@7ffd073(10406): handleResized, frames=ClientWindowFrames{frame=[0,0][1968,2184] display=[0,0][1968,2184] parentFrame=[0,0][0,0]} displayId=0 dragResizing=false compatScale=1.0 frameChanged=false attachedFrameChanged=false configChanged=false displayChanged=false compatScaleChanged=false dragResizingChanged=false
I/SurfaceView(10406): 94664830 Changes: creating=false format=false size=true visible=false alpha=false hint=false left=false top=true z=false attached=true lifecycleStrategy=false
I/SurfaceView(10406): 94664830 Cur surface: Surface(name=null mNativeObject=-5476376628226788848)/@0x59bf165
D/SurfaceComposerClient(10406): setCornerRadius ## 5a4787e SurfaceView[.MainActivity]@0#2892 cornerRadius=0.000000
I/BLASTBufferQueue_Java(10406): update, w= 1968 h= 2184 mName = 5a4787e SurfaceView[.MainActivity]@0 mNativeObject= 0xb4000077d24b0680 sc.mNativeObject= 0xb400007842483010 format= 4 caller= android.view.SurfaceView.setBufferSize:1703 android.view.SurfaceView.performSurfaceTransaction:1238 android.view.SurfaceView.updateSurface:1467 android.view.SurfaceView.setFrame:716 android.view.View.layout:26931 android.widget.FrameLayout.layoutChildren:345
I/SV94664830 MainActivity: pST: sr = Rect(0, 0 - 1968, 2184) sw = 1968 sh = 2184
D/SurfaceView(10406): 94664830 performSurfaceTransaction RenderWorker position = [0, 0, 1968, 2184] surfaceSize = 1968x2184
I/SV94664830 MainActivity: updateSurface: mVisible = true mSurface.isValid() = true
I/SV94664830 MainActivity: updateSurface: mSurfaceCreated = true surfaceChanged = false visibleChanged = false
I/SurfaceView(10406): 94664830 surfaceChanged -- format=4 w=1968 h=2184
I/SV94664830 MainActivity: surfaceChanged (1968,2184) 1 #5 io.flutter.embedding.android.FlutterSurfaceView{5a4787e V.E...... ......ID 0,0-1968,2184}
I/SurfaceView(10406): 94664830 surfaceRedrawNeeded
I/SurfaceView(10406): 94664830 finishedDrawing
V/SurfaceView(10406): Layout: x=0 y=0 w=1968 h=2184, frame=Rect(0, 0 - 1968, 2184)
W/libc (10406): Access denied finding property "vendor.gpp.create_frc_extension"
W/libc (10406): Access denied finding property "vendor.gpp.create_frc_extension"
I/VRI[MainActivity]@7ffd073(10406): registerCallbackForPendingTransactions
I/View (10406): setRequestedFrameRate frameRate=-4.0, this=com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebView{e068453 VFEDHVCL. .F...... 0,0-1968,2148 aid=1073741824}, caller=android.view.ViewGroup.setRequestedFrameRate:9947 WV.Z6.b:1 WV.z7.g:118 WV.z7.onDraw:7 com.android.webview.chromium.WebViewChromium.onDraw:35
D/SurfaceView(10406): 94664830 updateSurfacePosition RenderWorker, frameNr = 926, position = [0, 0, 1968, 2184] surfaceSize = 1968x2184
I/SV94664830 MainActivity: uSP: rtp = Rect(0, 0 - 1968, 2184) rtsw = 1968 rtsh = 2184
I/SV94664830 MainActivity: onSSPAndSRT: pl = 0 pt = 0 sx = 1.0 sy = 1.0
I/SV94664830 MainActivity: aOrMT: VRI[MainActivity]@7ffd073 t = android.view.SurfaceControl$Transaction@630522d fN = 926 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1932 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:401
I/VRI[MainActivity]@7ffd073(10406): mWNT: t=0xb4000079b24a2dd0 mBlastBufferQueue=0xb4000077d2540f80 fn= 926 HdrRenderState mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1863 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1932
I/VRI[MainActivity]@7ffd073(10406): mWNT: t=0xb4000079b24fcfd0 mBlastBufferQueue=0xb4000077d2540f80 fn= 926 HdrRenderState mRenderHdrSdrRatio=1.0 caller= android.view.ViewRootImpl$10.onFrameDraw:6487 android.view.ViewRootImpl$4.onFrameDraw:2474 android.view.ThreadedRenderer$1.onFrameDraw:718
I/View (10406): setRequestedFrameRate frameRate=-4.0, this=com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebView{e068453 VFEDHVCL. .F...... 0,0-1968,2184 aid=1073741824}, caller=android.view.ViewGroup.setRequestedFrameRate:9947 WV.Z6.b:1 WV.z7.g:118 WV.z7.onDraw:7 com.android.webview.chromium.WebViewChromium.onDraw:35
Flutter version
v.3.32.x - v3.35.x
Operating System, Device-specific and/or Tool
This issue has been confirmed on the Galaxy Fold 7 (Android 16) regardless of whether it's in the unfolded/collapsed state.
There were no issues on the Galaxy Note 10 5G (Android 12).
There were no issues on iPad Mini 6Gen (iPadOS 26).
Plugin version
v6.2.0-beta.2
Additional information
Begin single mode -> shift to multi window mode
Begin multi window mode -> shift to single mode
Reloading the widget restores the display to normal.
It seems like the issue started with Android 12L. Please check if this issue occurs on other devices and leave a comment with your device model and OS version. I wonder if it could be fixed faster.
Self grab
- I'm ready to work on this issue!