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-61231.html Change-Id: I21ce4ba750c089f6537316fb3a70bab79b9b00e0
This commit is contained in:
parent
1a37d49365
commit
c18ad621d3
@ -736,6 +736,22 @@ void MainPanelControl::startDrag(DockItem *item)
|
||||
drag->setMimeData(new QMimeData);
|
||||
drag->exec(Qt::MoveAction);
|
||||
|
||||
/**
|
||||
* 在关闭窗口特效模式下,拖动任务栏图标到外面时,存在 dropEvent 被其它窗口捕获的情况,
|
||||
* 导致 AppDragWidget 中的 dropEvent 无法触发,故这里特殊处理
|
||||
*/
|
||||
if (item->itemType() == DockItem::App && !DWindowManagerHelper::instance()->hasComposite()) {
|
||||
m_appDragWidget = nullptr;
|
||||
if (qobject_cast<AppItem *>(item)->isValid()) {
|
||||
if (-1 == m_appAreaSonLayout->indexOf(item) && m_dragIndex != -1) {
|
||||
insertItem(m_dragIndex, item);
|
||||
m_dragIndex = -1;
|
||||
}
|
||||
item->setDraging(false);
|
||||
item->update();
|
||||
}
|
||||
}
|
||||
|
||||
if (item->itemType() != DockItem::App || m_dragIndex == -1) {
|
||||
m_appDragWidget = nullptr;
|
||||
item->setDraging(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user