feat: 新增窗口呼出位置策略设置(记住上次位置/鼠标屏居中/主屏居中/上次活动屏居中)#558
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new setting, windowPositionStrategy, allowing users to configure the positioning strategy of the main window when it is summoned (options include remembering the last position, centering on the cursor screen, centering on the primary screen, or centering on the last active window's screen). The changes span across the settings UI, IPC channels, and the window manager. The review feedback highlights a potential issue in multi-monitor environments (especially on Windows) when using the lastActive strategy, where maximized windows can have negative coordinate offsets that might cause screen.getDisplayNearestPoint to misidentify the active display. It is recommended to use Number.isFinite for safer type checks and to calculate the window's center point for more accurate display detection.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
在设置页"通用-行为"分组新增"窗口呼出位置"下拉选项,支持四种定位策略:
记住上次位置(默认)鼠标屏居中主屏居中上次活动屏居中主要目的是模仿 wox 的默认行为,同时位置 ztools 的默认行为一致性
在
通用-行为下新建了一个下拉框作为配置