mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix: 修复切换分辨率后任务栏显示大小异常的问题
在分辨率发生变化,应该优先更新屏幕的大小信息再根据这些信息及计算出任务栏的位置,代码里逻辑是反的 Log: 修复切换分辨率后任务栏显示大小异常的问题 Bug: https://pms.uniontech.com/zentao/bug-view-36796.html
This commit is contained in:
parent
3fa69b4201
commit
96b4330e02
@ -691,11 +691,6 @@ void DockSettings::monitorAdded(const QString &path)
|
||||
connect(inter, &MonitorInter::YChanged, mon, &Monitor::setY);
|
||||
connect(inter, &MonitorInter::WidthChanged, mon, &Monitor::setW);
|
||||
connect(inter, &MonitorInter::HeightChanged, mon, &Monitor::setH);
|
||||
// 当屏幕的大小或者坐标信息发生变化后,需要更新一下监听区域.防止无法唤醒任务栏
|
||||
connect(inter, &MonitorInter::XChanged, this, &DockSettings::requestUpdateRegionWatch);
|
||||
connect(inter, &MonitorInter::YChanged, this, &DockSettings::requestUpdateRegionWatch);
|
||||
connect(inter, &MonitorInter::WidthChanged, this, &DockSettings::requestUpdateRegionWatch);
|
||||
connect(inter, &MonitorInter::HeightChanged, this, &DockSettings::requestUpdateRegionWatch);
|
||||
connect(inter, &MonitorInter::MmWidthChanged, mon, &Monitor::setMmWidth);
|
||||
connect(inter, &MonitorInter::MmHeightChanged, mon, &Monitor::setMmHeight);
|
||||
connect(inter, &MonitorInter::RotationChanged, mon, &Monitor::setRotate);
|
||||
@ -704,6 +699,14 @@ void DockSettings::monitorAdded(const QString &path)
|
||||
connect(inter, &MonitorInter::ModesChanged, mon, &Monitor::setModeList);
|
||||
connect(inter, &MonitorInter::RotationsChanged, mon, &Monitor::setRotateList);
|
||||
connect(inter, &MonitorInter::EnabledChanged, mon, &Monitor::setMonitorEnable);
|
||||
|
||||
// 当屏幕的大小或者坐标信息发生变化后,需要更新一下监听区域和任务栏大小
|
||||
connect(mon, &Monitor::geometryChanged, this, [ = ] {
|
||||
calculateWindowConfig();
|
||||
emit windowGeometryChanged();
|
||||
emit requestUpdateRegionWatch();
|
||||
});
|
||||
|
||||
connect(m_displayInter, static_cast<void (DisplayInter::*)(const QString &) const>(&DisplayInter::PrimaryChanged), mon, &Monitor::setPrimary);
|
||||
|
||||
// NOTE: DO NOT using async dbus call. because we need to have a unique name to distinguish each monitor
|
||||
|
Loading…
x
Reference in New Issue
Block a user