mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: 任务栏智能隐藏下,killall -2 dde-dock,任务栏不会自动显示
MIPS 下,开启了窗口特效,动画时间是 0。 此处不应该使用是否开启窗口特效来判断。 Log: 修复任务栏智能隐藏,杀掉进程不会自动显示 Bug: https://pms.uniontech.com/zentao/bug-view-92340.html Change-Id: I5f35396a989f04358fcd5a11e09f28e448b775f5
This commit is contained in:
parent
61336764f3
commit
a0ce73a0b3
@ -1042,8 +1042,8 @@ void MultiScreenWorker::displayAnimation(const QString &screen, const Position &
|
||||
QVariantAnimation *ani = new QVariantAnimation(this);
|
||||
ani->setEasingCurve(QEasingCurve::InOutCubic);
|
||||
|
||||
const bool composite = m_wmHelper->hasComposite(); // 判断是否开启特效模式
|
||||
#ifndef DISABLE_SHOW_ANIMATION
|
||||
const bool composite = m_wmHelper->hasComposite(); // 判断是否开启特效模式
|
||||
const int duration = composite ? ANIMATIONTIME : 0;
|
||||
#else
|
||||
const int duration = 0;
|
||||
@ -1074,13 +1074,13 @@ void MultiScreenWorker::displayAnimation(const QString &screen, const Position &
|
||||
switch (act) {
|
||||
case AniAction::Show:
|
||||
if (newState == QVariantAnimation::Running && oldState == QVariantAnimation::Stopped) {
|
||||
if (m_hideMode == HideMode::KeepShowing || composite)
|
||||
if (m_hideMode == HideMode::KeepShowing || duration)
|
||||
setStates(ShowAnimationStart);
|
||||
else
|
||||
setStates(DockIsShowing);
|
||||
}
|
||||
if (newState == QVariantAnimation::Stopped && oldState == QVariantAnimation::Running) {
|
||||
if (m_hideMode == HideMode::KeepShowing || composite)
|
||||
if (m_hideMode == HideMode::KeepShowing || duration)
|
||||
setStates(ShowAnimationStart, false);
|
||||
else // 如果不是一直显示的状态,则让其延时修改状态,防止在resetDock的时候重复改变其高度引起任务栏闪烁导致无法唤醒
|
||||
QTimer::singleShot(ANIMATIONTIME, [ = ] { setStates(DockIsShowing, false); });
|
||||
|
Loading…
x
Reference in New Issue
Block a user