fix: fix window positioning with multi-screen and scaling#730
fix: fix window positioning with multi-screen and scaling#730deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
| D_DC(DAbstractDialog); | ||
|
|
||
| moveToCenterByRect(d->getParentGeometry()); | ||
| QMetaObject::invokeMethod(this, "moveToCenterByRect", Qt::QueuedConnection, Q_ARG(QRect, d->getParentGeometry())); |
1. Changed moveToCenter() to use queued invocation of moveToCenterByRect() 2. This addresses timing issues when moving windows with multi-screen setups and scaling > 1 3. The queued connection ensures the geometry calculation happens after the window system has processed previous operations 4. Prevents incorrect window positioning due to race conditions in geometry updates Log: Fixed window positioning issues in multi-screen environments with display scaling Influence: 1. Test window centering on multi-monitor setups with different scaling factors 2. Verify dialog positioning when moving between screens with different DPI settings 3. Test window movement operations during screen configuration changes 4. Verify that windows appear correctly centered on their parent windows 5. Test with various display scaling values (100%, 125%, 150%, 200%) fix: 修复多屏幕和缩放时的窗口定位问题 1. 将 moveToCenter() 改为使用队列调用 moveToCenterByRect() 2. 解决了多屏幕设置和缩放大于1时窗口移动的时序问题 3. 队列连接确保几何计算在窗口系统处理完先前操作后执行 4. 防止由于几何更新中的竞争条件导致的窗口定位错误 Log: 修复了多屏幕环境下显示缩放时的窗口定位问题 Influence: 1. 在多显示器设置中使用不同缩放因子测试窗口居中功能 2. 验证在不同DPI设置的屏幕间移动时的对话框定位 3. 测试屏幕配置更改期间的窗口移动操作 4. 验证窗口是否在其父窗口上正确居中显示 5. 使用不同的显示缩放值进行测试(100%、125%、150%、200%) PMS: BUG-318977
deepin pr auto review这段代码的修改主要是将原本的同步调用 以下是对这段代码的详细审查意见,包括语法逻辑、代码质量、代码性能和代码安全方面的分析: 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
改进建议
总结该修改主要是为了解决时序问题(如布局未完成计算就居中)或闪烁问题。
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, xionglinlin 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 |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Log: Fixed window positioning issues in multi-screen environments with display scaling
Influence:
fix: 修复多屏幕和缩放时的窗口定位问题
Log: 修复了多屏幕环境下显示缩放时的窗口定位问题
Influence:
PMS: BUG-318977