fix: 修复任务栏各种无法唤醒和显示错位问题

任务栏无法唤醒基本都是因为监听的屏幕区域没有在屏幕大小和坐标发生变化的时候及时更新信息,
显示错位是因为动画完成后内部有些变量未更新导致的,

Log: 修复任务栏隐藏后切换位置或者调整屏幕无法唤起和显示到屏幕外部的问题
Bug: https://pms.uniontech.com/zentao/bug-view-34468.html
Bug: https://pms.uniontech.com/zentao/bug-view-34467.html
Bug: https://pms.uniontech.com/zentao/bug-view-34458.html
Bug: https://pms.uniontech.com/zentao/bug-view-34454.html
Bug: https://pms.uniontech.com/zentao/bug-view-34444.html
Bug: https://pms.uniontech.com/zentao/bug-view-34437.html
Bug: https://pms.uniontech.com/zentao/bug-view-34340.html
Bug: https://pms.uniontech.com/zentao/bug-view-33718.html
Bug: https://pms.uniontech.com/zentao/bug-view-33693.html
Bug: https://pms.uniontech.com/zentao/bug-view-32854.html
Bug: https://pms.uniontech.com/zentao/bug-view-32849.html
Bug: https://pms.uniontech.com/zentao/bug-view-32830.html
This commit is contained in:
范朋程 2020-06-22 14:03:18 +08:00
parent ea67db4aa6
commit 74475ecf86
3 changed files with 7 additions and 3 deletions

View File

@ -499,6 +499,8 @@ void DockSettings::resetFrontendGeometry()
m_frontendRect = QRect(p.x(), p.y(), w, h);
m_dockInter->SetFrontendWindowRect(p.x(), p.y(), w, h);
emit requestUpdateDockGeometry(m_frontendRect);
}
void DockSettings::updateFrontendGeometry()

View File

@ -95,6 +95,7 @@ signals:
void trayCountChanged() const;
// 分标率发生变化需要更新XEventMonitor的监视区域
void requestUpdateRegionWatch();
void requestUpdateDockGeometry(const QRect &rect);
public slots:
void updateGeometry();

View File

@ -306,7 +306,7 @@ bool MainWindow::event(QEvent *e)
switch (e->type()) {
case QEvent::Move:
if (!e->spontaneous())
QTimer::singleShot(1, this, &MainWindow::positionCheck);
QTimer::singleShot(100, this, &MainWindow::positionCheck);
break;
default:;
}
@ -824,7 +824,6 @@ void MainWindow::adjustShadowMask()
DStyleHelper dstyle(style());
const int radius = dstyle.pixelMetric(DStyle::PM_TopLevelWindowRadius);
m_platformWindowHandle.setWindowRadius(composite && isFasion ? radius : 0);
}
@ -839,7 +838,9 @@ void MainWindow::positionCheck()
return;
// this may cause some position error and animation caton
//internalMove();
bool isHide = m_settings->hideState() == Hide && !testAttribute(Qt::WA_UnderMouse);
const QRect windowRect = m_settings->windowRect(m_dockPosition, isHide);
internalMove(windowRect.topLeft());
}
void MainWindow::onDbusNameOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner)