mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: 智能隐藏时,窗口最大化并不能隐藏任务栏
窗口最大化时,任务栏处于智能隐藏模式时没有调整窗口占用位置,最大化后不与任务栏产生重叠,所以没有隐藏。个人观点之前逻辑一定角度看不算问题 Log: 修复智能隐藏时,窗口最大化并不能隐藏任务栏问题 Bug: https://pms.uniontech.com/zentao/bug-view-54538.html Change-Id: Ie5c3a6b3fc78c733e4175eeb62716f37fb1103b4
This commit is contained in:
parent
2b4f2ba456
commit
7ae745d2b9
@ -730,7 +730,12 @@ void MultiScreenWorker::onRequestNotifyWindowManager()
|
||||
static QRect lastRect = QRect();
|
||||
|
||||
const auto ratio = qApp->devicePixelRatio();
|
||||
const QRect rect = getDockShowGeometry(m_ds.current(), m_position, m_displayMode);
|
||||
QRect rect;
|
||||
if (m_hideMode == HideMode::KeepShowing) {
|
||||
rect = getDockShowGeometry(m_ds.current(), m_position, m_displayMode);
|
||||
} else {
|
||||
rect = getDockHideGeometry(m_ds.current(), m_position, m_displayMode);
|
||||
}
|
||||
|
||||
// 已经设置过了,避免重复设置
|
||||
if (rect == lastRect)
|
||||
@ -749,11 +754,10 @@ void MultiScreenWorker::onRequestNotifyWindowManager()
|
||||
|
||||
// 除了"一直显示"模式,其他的都不要设置任务栏区域
|
||||
if (m_hideMode != Dock::KeepShowing) {
|
||||
lastRect = QRect();
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug() <<"Update Window WorkArea:" << rect;
|
||||
qDebug() << "Update Window WorkArea:" << rect;
|
||||
|
||||
const QPoint &p = rawXPosition(rect.topLeft());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user