Repository navigation
fix(macos): restore app chrome in fullscreen - #1031
Open
Life-go-on wants to merge 1 commit into
Open
Life-go-on wants to merge 1 commit into
Life-go-on wants to merge 1 commit into
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.
Advertising, commercial promotion, and traffic solicitation are prohibited in PRs
and Issues. Business requests must go through the email in the
contribution policy.
PRs or Issues containing unauthorized promotion will be closed directly.
严禁利用 PR 或 Issue 推广、引流,未经授权的推广将直接关闭;商业需求请通过贡献指南中的邮箱沟通,已获批准的赞助按批准范围处理。
Result / 用户结果
修复 macOS 原生全屏时,顶部持续出现灰色区域并遮挡 Pebrel 自绘标题栏控件的问题。
进入全屏后隐藏空的原生工具栏,让应用自己的标题栏控件和主题背景正常显示;
退出全屏后恢复原生工具栏。
Related issue: #1024
Design / 设计边界
Responsibility and affected modules:
pebrel_app/src/platform/window_chrome/macos.rs管理 macOS 原生Unified toolbar 和全屏切换时的可见性。
pebrel_app/src/gpui_shell/workspace/window_titlebar.rs扩展标题栏布局回归测试。
pebrel_app/Cargo.toml启用已有的objc2-foundation/NSNotificationfeature。
Why this belongs here; interfaces that remain unchanged:
AppKit 的空 Unified toolbar 在全屏时由独立的原生窗口显示,单独恢复主窗口
标题栏透明度不能消除遮挡。此改动在 macOS 平台适配层响应全屏通知:进入全屏后
隐藏空工具栏并恢复主窗口标题栏透明度,退出全屏后恢复工具栏。
保留 Pebrel 自绘标题栏行、现有主题颜色和原生窗口控件;不使用固定主题颜色、
负边距或任意偏移,也不改变现有公开接口。
Dependency, data-format, threading, or lifetime changes :
只启用现有
objc2-foundation依赖的NSNotificationfeature,不升级依赖版本。原生 toolbar 注册的通知按所属窗口过滤,并在主线程处理。AppKit 持有 toolbar;
基于 selector 的通知观察者不会额外持有 toolbar。没有持久化格式或线程模型变更。
Compatibility and migration/fallback behavior:
行为修改限定在 macOS 路径;Windows 和 Linux 路径不变。退出全屏后恢复普通窗口
的原生工具栏,不需要配置迁移。
Evidence / 验证依据
实机反馈
Required Review / 必须确认
CONTRIBUTING.md,docs/architecture.md, anddocs/project-constraints.md.python3 scripts/check_architecture.py --base 303a7f4epasses; budgets were not inflated to fit the change.Checkboxes explain the review; they do not replace CI or maintainer approval.