fix: 修复关闭任意预览窗口退出预览问题

鼠标焦点离开预览窗口或者关闭最后一个窗口时退出预览,其他情形不退出预览

Log: 优化任务栏关闭预览窗口时人机交互逻辑
Influence: 任务栏-某一个应用打开多个窗口时,鼠标焦点离开预览窗口或者关闭最后一个预览窗口时退出预览,其他情形不退出预览
Bug: https://pms.uniontech.com/zentao/bug-view-82890.html
Change-Id: I5889b2a1aeb493c764910a5a1f5877fd6b85720b
This commit is contained in:
songwentao 2021-12-06 14:28:59 +08:00
parent 95b16f4b7e
commit 0c10c2186d

View File

@ -329,7 +329,7 @@ void PreviewContainer::onRequestCloseAppSnapshot()
if (!m_wmHelper->hasComposite())
return ;
if (m_currentWId != m_snapshots.lastKey()) {
if (m_snapshots.keys().isEmpty()) {
Q_EMIT requestHidePopup();
Q_EMIT requestCancelPreviewWindow();
}