fix: fix the dock sometimes can not show for bug 23580

23580 【桌面专业版】【曙光】【Hygon C86 3185】【W330-H35】【uos 20 20200327 x86_64】屏幕多次锁屏打开后任务栏消失
This commit is contained in:
wangxuwen 2020-04-30 15:12:25 +08:00
parent 66243bda78
commit df819075e3
2 changed files with 13 additions and 0 deletions

View File

@ -424,6 +424,12 @@ void DockSettings::primaryScreenChanged()
m_screenRawHeight = m_displayInter->screenRawHeight();
m_screenRawWidth = m_displayInter->screenRawWidth();
//为了防止当后端发送错误值,然后发送正确值时,任务栏没有移动在相应的位置
//当没有获取到屏幕资源时候move函数会失效。可以直接return
if (m_screenRawHeight == 0 || m_screenRawWidth == 0){
return;
}
updateForbidPostions();
emit dataChanged();
calculateWindowConfig();

View File

@ -613,6 +613,13 @@ void MainWindow::updatePosition()
void MainWindow::updateGeometry()
{
// DockDisplayMode and DockPosition MUST be set before invoke setFixedSize method of MainPanel
//为了防止当后端发送错误值,然后发送正确值时,任务栏没有移动在相应的位置
//当没有获取到屏幕资源时候move函数会失效。可以直接return
if(m_settings->primaryRect().width() ==0 || m_settings->primaryRect().height() == 0){
return;
}
setStrutPartial();
m_mainPanel->setDisplayMode(m_settings->displayMode());