mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix(preview): crash when click active item on 2d
bugID=515
This commit is contained in:
parent
c94a4d69a5
commit
2b51e164aa
@ -116,11 +116,13 @@ void PreviewContainer::checkMouseLeave()
|
|||||||
|
|
||||||
m_floatingPreview->setVisible(false);
|
m_floatingPreview->setVisible(false);
|
||||||
|
|
||||||
if (m_needActivate) {
|
if (m_wmHelper->hasComposite()) {
|
||||||
m_needActivate = false;
|
if (m_needActivate) {
|
||||||
emit requestActivateWindow(m_floatingPreview->trackedWid());
|
m_needActivate = false;
|
||||||
} else {
|
emit requestActivateWindow(m_floatingPreview->trackedWid());
|
||||||
emit requestCancelPreviewWindow();
|
} else {
|
||||||
|
emit requestCancelPreviewWindow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emit requestHidePopup();
|
emit requestHidePopup();
|
||||||
@ -217,7 +219,9 @@ void PreviewContainer::dragLeaveEvent(QDragLeaveEvent *e)
|
|||||||
|
|
||||||
void PreviewContainer::onSnapshotClicked(const WId wid)
|
void PreviewContainer::onSnapshotClicked(const WId wid)
|
||||||
{
|
{
|
||||||
Q_UNUSED(wid);
|
if (!m_wmHelper->hasComposite()) {
|
||||||
|
emit requestActivateWindow(wid);
|
||||||
|
}
|
||||||
|
|
||||||
m_needActivate = true;
|
m_needActivate = true;
|
||||||
// the leaveEvent of this widget will be called after this signal
|
// the leaveEvent of this widget will be called after this signal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user