mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix: 修复任务栏设置右边且一直隐藏时,唤起通知中心显示异常的问题
由于去掉了com.deepin.dde.dock接口的调用,通过后端接口获取的dock的区域是一直显示的区域,导致该问题的出现 一直隐藏时也需要设置dock区域,但当设置为智能隐藏模式时,后端已经处理,隐藏后不需要再次设置dock区域,会导致后端接口循环调用 Log: 修复任务栏设置右边且一直隐藏时,唤起通知中心显示异常的问题 Influence: 唤起通知中心 Bug: https://pms.uniontech.com/bug-view-128235.html Change-Id: I12b7f23e184b74aa47ae1ec099d75b16a9cc37af
This commit is contained in:
parent
a92dc694f2
commit
356648a990
@ -149,7 +149,7 @@ QRect MultiScreenWorker::dockRect(const QString &screenName)
|
||||
*/
|
||||
QRect MultiScreenWorker::dockRectWithoutScale(const QString &screenName, const Position &pos, const HideMode &hideMode, const DisplayMode &displayMode)
|
||||
{
|
||||
if (hideMode == HideMode::KeepShowing)
|
||||
if (hideMode == HideMode::KeepShowing || m_currentHideState == HideState::Show)
|
||||
return getDockShowGeometry(screenName, pos, displayMode, true);
|
||||
else
|
||||
return getDockHideGeometry(screenName, pos, displayMode, true);
|
||||
@ -660,10 +660,10 @@ void MultiScreenWorker::onRequestUpdateRegionMonitor()
|
||||
|
||||
void MultiScreenWorker::onRequestUpdateFrontendGeometry()
|
||||
{
|
||||
const QRect rect = dockRectWithoutScale(m_ds.current(), m_position, HideMode::KeepShowing, m_displayMode);
|
||||
const QRect rect = dockRectWithoutScale(m_ds.current(), m_position, m_hideMode, m_displayMode);
|
||||
|
||||
//!!! 向com.deepin.dde.daemon.Dock的SetFrontendWindowRect接口设置区域时,此区域的高度或宽度不能为0,否则会导致其HideState属性循环切换,造成任务栏循环显示或隐藏
|
||||
if (rect.width() == 0 || rect.height() == 0)
|
||||
//!!! 智能隐藏模式下隐藏之后不需要在设置一次,否则会导致HideState属性循环变化
|
||||
if (m_hideMode == HideMode::SmartHide && m_currentHideState == HideState::Hide)
|
||||
return;
|
||||
|
||||
#ifdef QT_DEBUG
|
||||
@ -1024,6 +1024,7 @@ void MultiScreenWorker::displayAnimation(const QString &screen, const Position &
|
||||
|| testState(ShowAnimationStart))
|
||||
return;
|
||||
|
||||
m_currentHideState = act ? HideState::Hide : HideState::Show;
|
||||
QRect mainwindowRect = parent()->geometry();
|
||||
QRect dockShowRect = getDockShowGeometry(screen, pos, m_displayMode);
|
||||
QRect dockHideRect = getDockHideGeometry(screen, pos, m_displayMode);
|
||||
|
@ -269,6 +269,7 @@ private:
|
||||
Position m_position;
|
||||
HideMode m_hideMode;
|
||||
HideState m_hideState;
|
||||
HideState m_currentHideState;
|
||||
DisplayMode m_displayMode;
|
||||
|
||||
/***************不和其他流程产生交互,尽量不要动这里的变量***************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user