You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addresses the remaining Windows startup-position and ordinary-window restoration paths; configured dimensions already had a separate implementation.
Current upstream checks at 5e6d5035: all reported checks passed. Maintainer/Code Owner approval and any platform acceptance limitations described in the PR remain outstanding. This update does not close the issue.
Activity
WilliamWang1721 commentedon Sep 27, 2026
结论:根因与修复进展
先给一个明确的答复:这不是 DPI 换算错误,而是 GPUI 壳从来没有任何地方读取
config.window.*。 报告的观察(pebrel config check说配置合法,GUI 却完全不生效)与代码状态一致:pebrel config check走config::source::discover+config::load_source这条解析链,所以window.dimensions/window.position会被正确认下;default = ["gpui-shell"])与这条链没有任何连接点:壳内唯一碰配置文件的是设置页的 TOML 读取(discover_toml,不含 Lua),窗口几何则固定为 1080×720 逻辑像素居中 + 由内建 116×30 画布反推启动网格。也就是说config.window.*在 GUI 侧没有读者。修复在 PR #313:启动时经上面同一套发现/解析入口读取一次
config.window.dimensions(Lua、TOML、YAML 一路通,优先级与config check一致),交给既有的prepare_initial_grid用「窗口自身缩放域里量到的 cell 尺寸 × 行列」换算成像素。因此 155×43 在 125%(DPI 120)下会按网格落位,而不是按 100% 的像素硬算;未配置时仍是原来的 116×30 默认画布,配置过大时沿用原有的 95% 工作区收拢钳制。@Kuddev 请复核。目前状态:本 PR 上游 CI 10/10 全绿(含
Tests (windows-2022)、Tests (windows-11-arm)、architecture-contracts、lint、pr-size),新增两个回归测试已通过;无冲突、分支未落后main,只差 review。我在 PR 里刻意用了Refs #312而不是Fixes,因为这一版只覆盖 dimensions,position仍未生效——如果你觉得尺寸部分足以闭环,可以把 #312 关闭并关联 #313;position我建议单独拆一个 issue 跟踪(原因见下)。关于
position(本 PR 未做)gpui 只允许在建窗时通过
WindowOptions::window_bounds指定位置,单位是逻辑像素,既没有运行中移动窗口的接口,App层也拿不到 scale factor;而旧壳是直接给 winit 传PhysicalPosition。把x = 197, y = 102原样当逻辑像素传进去,在你报告的 125% 缩放下就会偏移约五分之一屏幕——与其交一个已知错误结果,这一版先不接。startup_mode、decorations、dynamic_title同理仍是旧壳专属。需要的话我可以另开 issue 说明底层缺口。验收说明
我这边无法给出 Windows 实机视觉验收:这台机器只有 Command Line Tools,
gpui_macos的 build script 缺 Xcode 的metal工具,本地无法编译/运行 GUI,所以编译与测试证据全部来自 PR 触发的上游 CI(详情见 #313 的 CI evidence 评论)。合并后如果你能拿 preview 包在 Windows 11 125% 下确认一次 155×43 的实际行列数,会很有帮助;另外cell_width_mode=compact与font_size=14会影响每个 cell 的像素宽度,因此窗口像素尺寸不会等于你按 1080×720 心算的值——生效的是网格行列。fix(gpui): open the startup window at config.window.dimensions
WilliamWang1721 commentedon Oct 3, 2026
Implementation is available in PR #460 (#460).
Addresses the remaining Windows startup-position and ordinary-window restoration paths; configured dimensions already had a separate implementation.
Current upstream checks at
5e6d5035: all reported checks passed. Maintainer/Code Owner approval and any platform acceptance limitations described in the PR remain outstanding. This update does not close the issue.Kuddev commentedon Oct 24, 2026
修复已由 #460(合并提交
14f93e2f)及此前已合入的网格尺寸实现 合入 main。已补齐本报告剩余的 Windows
window.position路径;显式网格尺寸/坐标优先于保存的普通窗口几何。验证:当前 main 的 Windows 原生 CI 已通过显式配置、窗口快照和坐标相关回归。具体 125% DPI 设备的人工观察没有在本次执行。
已核对修复提交包含在 main
4e93a085中,当前主线验证记录:https://github.com/Kuddev/pebrel/actions/runs/40069729178。按已合入修复关闭此 issue;若包含上述提交的构建仍有同样问题,可补充最小复现后重新打开。