fix: dual-screen extension mode primary migration and window-output binding#1027
fix: dual-screen extension mode primary migration and window-output binding#1027deepin-wm wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Sorry @deepin-wm, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-wm The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1. Fix onScreenRemoved primary migration condition: use isCurrentPrimary || wasPrimaryBeforeRemoval instead of !isCurrentPrimary && !wasPrimaryBeforeRemoval to correctly migrate windows when primary output is removed 2. Add window-output binding record and restore mechanism: SurfaceBinding stores surfaceState, getAllOutputSurfaces collects surfaces across all workspaces, use primaryOutput() directly in onScreenRemoved to avoid conflict with removeOutput's primary selection, overwrite strategy for duplicate recordSurfaceBinding calls, skip restore for user-moved windows (positionAutomatic), qBound boundary constraint in restoreSurfaceBindings Log: Fixed windows not migrating to remaining screen when primary output is unplugged in dual-screen extension mode, and windows not returning to original screen when reconnected Influence: 1. Test unplugging primary screen in extension mode, verify windows migrate to remaining screen 2. Test unplugging secondary screen, verify windows migrate to primary screen 3. Test reconnecting screens, verify windows return to original positions 4. Test maximized and fullscreen window migration 5. Test minimized window restoration after screen reconnect fix: 扩展模式主屏迁移和窗口-输出绑定 1. 修复 onScreenRemoved 主屏迁移条件:使用 isCurrentPrimary || wasPrimaryBeforeRemoval 替代 !isCurrentPrimary && !wasPrimaryBeforeRemoval, 正确处理主屏移除时窗口迁移 2. 新增窗口-输出绑定记录与恢复机制: SurfaceBinding 存储 surfaceState, getAllOutputSurfaces 收集所有工作区的 surface, 在 onScreenRemoved 中直接使用 primaryOutput() 避免与 removeOutput 的主屏选择冲突, 覆盖策略处理重复 recordSurfaceBinding 调用, 跳过用户手动移动的窗口(positionAutomatic), restoreSurfaceBindings 中使用 qBound 边界约束 Log: 修复扩展模式拔掉主屏后窗口未迁移到剩余屏幕, 以及重新连接后窗口未回到原屏幕的问题 Influence: 1. 测试扩展模式拔掉主屏,验证窗口迁移到剩余屏幕 2. 测试拔掉副屏,验证窗口迁移到主屏 3. 测试重新连接屏幕,验证窗口回到原位置 4. 测试最大化和全屏窗口的迁移 5. 测试最小化窗口在重新连接屏幕后的恢复
e1e3253 to
060fad4
Compare
There was a problem hiding this comment.
Sorry @deepin-wm, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
060fad4 to
e2762a9
Compare
修复内容
Fixes: #1002