mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix: 打开多个窗口在桌面,在任务栏预览窗口点击窗口关闭按钮,窗口被关闭,其它窗口被隐藏
中间预览窗口较特殊,点击关闭时中间预览和左侧首个预览,鼠标没有离开事件,修改为当点击中间和左侧首个预览窗口关闭按钮,发送关闭信号处理逻辑 Log: 修复任务栏打开多个窗口在桌面,在任务栏预览窗口点击窗口关闭按钮,窗口被关闭,其它窗口被隐藏 Bug: https://pms.uniontech.com/zentao/bug-view-48677.html Change-Id: Ief953f2501e75950374d7b617136641719186fa0
This commit is contained in:
parent
199d0a7345
commit
165fe9586c
@ -108,6 +108,8 @@ void AppSnapshot::closeWindow() const
|
||||
e.xclient.data.l[0] = XInternAtom(display, "WM_DELETE_WINDOW", false);
|
||||
e.xclient.data.l[1] = CurrentTime;
|
||||
|
||||
Q_EMIT requestCloseAppSnapshot();
|
||||
|
||||
XSendEvent(display, m_wid, false, NoEventMask, &e);
|
||||
XFlush(display);
|
||||
}
|
||||
|
@ -68,6 +68,7 @@ signals:
|
||||
void entered(const WId wid) const;
|
||||
void clicked(const WId wid) const;
|
||||
void requestCheckWindow() const;
|
||||
void requestCloseAppSnapshot() const;
|
||||
|
||||
public slots:
|
||||
void fetchSnapshot();
|
||||
|
@ -120,6 +120,7 @@ void PreviewContainer::checkMouseLeave()
|
||||
m_needActivate = false;
|
||||
emit requestActivateWindow(m_floatingPreview->trackedWid());
|
||||
} else {
|
||||
Q_EMIT requestHidePopup();
|
||||
emit requestCancelPreviewWindow();
|
||||
}
|
||||
}
|
||||
@ -170,6 +171,15 @@ void PreviewContainer::appendSnapWidget(const WId wid)
|
||||
connect(snap, &AppSnapshot::clicked, this, &PreviewContainer::onSnapshotClicked, Qt::QueuedConnection);
|
||||
connect(snap, &AppSnapshot::entered, this, &PreviewContainer::previewEntered, Qt::QueuedConnection);
|
||||
connect(snap, &AppSnapshot::requestCheckWindow, this, &PreviewContainer::requestCheckWindows, Qt::QueuedConnection);
|
||||
connect(snap, &AppSnapshot::requestCloseAppSnapshot, this, [this](){
|
||||
if (!m_wmHelper->hasComposite())
|
||||
return ;
|
||||
|
||||
if (m_currentWId != m_snapshots.lastKey()) {
|
||||
Q_EMIT requestHidePopup();
|
||||
Q_EMIT requestCancelPreviewWindow();
|
||||
}
|
||||
});
|
||||
|
||||
m_windowListLayout->addWidget(snap);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user