Skip to content

Conversation

Blinue
Copy link
Owner

@Blinue Blinue commented Aug 26, 2025

来自 #1232 (comment) 的反馈

有的游戏弹窗使用和主窗口相同的类名,因此启用自动缩放后将中止缩放主窗口转而缩放弹窗(#1227 实现了这个机制),这不是我们想要的。这个 PR 为自动缩放添加限制,正在缩放窗口时禁止自动缩放它的窗口。检测两种弹窗:

  1. 所有者关系弹窗
  2. 弹出时将主窗口禁用的“假”模态弹窗

第二个情况是不可能准确检测的,只能尽可能增加限制以减少误判,我们检查三个条件:

  1. 主窗口处于禁用状态
  2. 两个窗口位于同一个进程
  3. 主窗口没有传统意义的弹窗

其他更改:

  1. WindowCase 支持模拟类名和主窗口相同的弹窗
  2. WindowCase 重构

@Blinue Blinue added the enhancement New feature or request label Aug 26, 2025
@Blinue Blinue merged commit 74d26e4 into dev Aug 26, 2025
8 checks passed
@Blinue Blinue deleted the fix/same-class-popup branch August 26, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant