From f2e5b92096025ea98711e209a4b0f5e4c4993a36 Mon Sep 17 00:00:00 2001 From: Fan PengCheng Date: Fri, 7 Aug 2020 23:03:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E8=B0=83=E6=95=B4=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=A0=8F=E4=B8=8D=E9=9A=90=E8=97=8F=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 一直隐藏模式或能隐藏模式且为隐藏状态时,任务栏切换位置直接隐藏就好 Log: 修复隐藏模式下调整位置任务栏不隐藏的问题 Bug: https://pms.uniontech.com/zentao/bug-view-41920.html Change-Id: Ia75a7bc209050f0c4e75cb9563bdc5bffbecb2a8 Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/1464 Reviewed-by: fanpengcheng Tested-by: fanpengcheng --- frame/util/multiscreenworker.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/frame/util/multiscreenworker.cpp b/frame/util/multiscreenworker.cpp index f21afba10..42de0245c 100644 --- a/frame/util/multiscreenworker.cpp +++ b/frame/util/multiscreenworker.cpp @@ -483,7 +483,15 @@ void MultiScreenWorker::onPositionChanged() DockItem::setDockPosition(position); qApp->setProperty(PROP_POSITION, QVariant::fromValue(position)); - emit requestUpdatePosition(lastPos, position); + if (m_hideMode == HideMode::KeepHidden || (m_hideMode == HideMode::SmartHide && m_hideState == HideState::Hide)) { + // 这种情况切换位置,任务栏不需要显示 + hideAni(m_ds.current()); + } else { + // 一直显示的模式才需要显示 + emit requestUpdatePosition(lastPos, position); + } + + emit requestUpdateLayout(m_ds.current()); emit requestUpdateRegionMonitor(); } @@ -1351,11 +1359,9 @@ QRect MultiScreenWorker::getDockShowGeometry(const QString &screenName, const Po } } } - #ifdef QT_DEBUG qDebug() << rect; #endif - return rect; } @@ -1441,11 +1447,9 @@ QRect MultiScreenWorker::getDockHideGeometry(const QString &screenName, const Po } } } - #ifdef QT_DEBUG qDebug() << rect; #endif - return rect; }