Repository navigation
fix(ohos): 横屏小窗判定改用系统自由窗口模式,修复2in1/平板自由多窗/电脑模式下进出全屏界面整体缩放 - #184
Merged
wm-develop merged 1 commit intoSep 24, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题#183
在 2in1(PC)、平板开启自由多窗、平板电脑模式下,应用窗口状态恒为 FLOATING,被当成手机/平板的「系统小窗」处理:窗口内进入横屏全屏时套用了横屏小窗的 0.75 缩放与
enableLandscapeMultiWindow,每次进出全屏界面整体缩放一次,观感即 DPI 突变。修复
Window.isInFreeWindowMode()(API 22,与 compatibleSdkVersion 一致)判断窗口是否处于系统自由窗口模式,随getWindowState下发初值,并监听freeWindowModeChange,运行中开关自由多窗/切换电脑模式时实时推送给 Dart。_miniWindow && _landscape && !_freeWindowMode;模式变化时重新评估缩放(抽出_applyMiniWindowLandscape()复用)。deviceType判断:平板(含带电脑模式的 MatePad Edge,实测上报tablet)都不是2in1,且自由多窗可在运行中开关。