mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
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:
parent
66243bda78
commit
df819075e3
@ -424,6 +424,12 @@ void DockSettings::primaryScreenChanged()
|
||||
m_screenRawHeight = m_displayInter->screenRawHeight();
|
||||
m_screenRawWidth = m_displayInter->screenRawWidth();
|
||||
|
||||
//为了防止当后端发送错误值,然后发送正确值时,任务栏没有移动在相应的位置
|
||||
//当qt没有获取到屏幕资源时候,move函数会失效。可以直接return
|
||||
if (m_screenRawHeight == 0 || m_screenRawWidth == 0){
|
||||
return;
|
||||
}
|
||||
|
||||
updateForbidPostions();
|
||||
emit dataChanged();
|
||||
calculateWindowConfig();
|
||||
|
@ -613,6 +613,13 @@ void MainWindow::updatePosition()
|
||||
void MainWindow::updateGeometry()
|
||||
{
|
||||
// DockDisplayMode and DockPosition MUST be set before invoke setFixedSize method of MainPanel
|
||||
|
||||
//为了防止当后端发送错误值,然后发送正确值时,任务栏没有移动在相应的位置
|
||||
//当qt没有获取到屏幕资源时候,move函数会失效。可以直接return
|
||||
if(m_settings->primaryRect().width() ==0 || m_settings->primaryRect().height() == 0){
|
||||
return;
|
||||
}
|
||||
|
||||
setStrutPartial();
|
||||
|
||||
m_mainPanel->setDisplayMode(m_settings->displayMode());
|
||||
|
Loading…
x
Reference in New Issue
Block a user