Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复对全屏窗口的支持 #877

Merged
merged 5 commits into from
Apr 6, 2024
Merged

修复对全屏窗口的支持 #877

merged 5 commits into from
Apr 6, 2024

Conversation

Blinue
Copy link
Owner

@Blinue Blinue commented Apr 4, 2024

Close #876

有些全屏的窗口实际上是“最大化”的,比如 Magpie 缩放窗口为了和 Wallpaper Engine 兼容 #812 就使用了这个技术。因此现在情况比较复杂了:

  1. 原生最大化窗口需要裁剪到屏幕工作区,由于最大化窗口的实现机制,窗口有一部分位于工作区外,在 Win11 中甚至下边框也是存在的。
  2. 全屏最大化窗口通常会覆盖任务栏,因此应裁剪到屏幕边界,而不是工作区。Windows 不会阻止全屏最大化窗口跨越多个屏幕,但依然只会在一个屏幕上渲染,因此可以认为全屏最大化窗口和原生最大化窗口一样不能跨越多个屏幕。

以是否绘制了原生边框区分这两种窗口。

@Blinue Blinue added the bug Something isn't working label Apr 4, 2024
@Blinue
Copy link
Owner Author

Blinue commented Apr 6, 2024

原生最大化窗口需要裁剪到屏幕工作区,由于最大化窗口的实现机制,窗口有一部分位于工作区外,在 Win11 中甚至下边框也是存在的。

我发现这是不需要的,不用担心下边框在工作区外,因为缩放时下边框始终会被裁剪掉。始终裁剪到屏幕边界是安全的。

@Blinue Blinue merged commit 18bf0e0 into dev Apr 6, 2024
4 checks passed
@Blinue Blinue deleted the fullscreen branch April 6, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

全屏下开启Magpie后显示不全
1 participant