mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-01 07:05:48 +00:00
fix: dock will not auto hide after set size
Issue: https://github.com/linuxdeepin/developer-center/issues/7129 Log:
This commit is contained in:
parent
241e668ea2
commit
478f564631
@ -142,6 +142,7 @@ void MultiScreenWorker::onExtralRegionMonitorChanged(int x, int y, const QString
|
||||
|
||||
void MultiScreenWorker::updateDisplay()
|
||||
{
|
||||
tryToHideDock();
|
||||
//1、屏幕停靠信息,
|
||||
//2、任务栏当前显示在哪个屏幕也需要更新
|
||||
//3、任务栏高度或宽度调整的拖拽区域,
|
||||
@ -548,7 +549,7 @@ void MultiScreenWorker::onRequestDelayShowDock()
|
||||
|
||||
void MultiScreenWorker::initMembers()
|
||||
{
|
||||
m_monitorUpdateTimer->setInterval(100);
|
||||
m_monitorUpdateTimer->setInterval(1000);
|
||||
m_monitorUpdateTimer->setSingleShot(true);
|
||||
|
||||
m_delayWakeTimer->setSingleShot(true);
|
||||
@ -957,3 +958,16 @@ void MultiScreenWorker::tryToShowDock(int eventX, int eventY)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MultiScreenWorker::tryToHideDock()
|
||||
{
|
||||
if (hideMode() == HideMode::KeepShowing) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto mousePos = QCursor::pos();
|
||||
const QString ¤tScreen = DOCK_SCREEN->current();
|
||||
if (isCursorOut(mousePos.x(), mousePos.y())) {
|
||||
Q_EMIT requestPlayAnimation(currentScreen, m_position, Dock::AniAction::Hide);
|
||||
}
|
||||
}
|
||||
|
@ -153,6 +153,7 @@ private:
|
||||
void reInitDisplayData();
|
||||
|
||||
void tryToShowDock(int eventX, int eventY);
|
||||
void tryToHideDock();
|
||||
void changeDockPosition(QString fromScreen, QString toScreen, const Position &fromPos, const Position &toPos);
|
||||
|
||||
void resetDockScreen();
|
||||
|
Loading…
x
Reference in New Issue
Block a user