fix drag drop to window not work

Change-Id: I0dd74bcda295996ca32d3bb7e6d9e723f43dc160
This commit is contained in:
石博文 2017-11-29 10:33:42 +08:00 committed by Deepin Code Review
parent 74348228d9
commit c8fb5ed35d
Notes: Deepin Code Review 2017-11-29 11:15:32 +08:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: 石博文 <sbw@sbw.so>
Verified+1: <yefei@linuxdeepin.com>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Wed, 29 Nov 2017 11:15:31 +0800
Reviewed-on: https://cr.deepin.io/28995
Project: dde/dde-dock
Branch: refs/heads/master

View File

@ -102,20 +102,17 @@ void PreviewContainer::checkMouseLeave()
{
const bool hover = underMouse();
if (!hover)
if (hover)
return;
emit requestCancelAndHidePreview();
m_floatingPreview->setVisible(false);
if (m_needActivate)
{
emit requestCancelAndHidePreview();
m_floatingPreview->setVisible(false);
if (!isVisible())
return;
if (m_needActivate)
{
m_needActivate = false;
emit requestActivateWindow(m_floatingPreview->trackedWid());
}
m_needActivate = false;
emit requestActivateWindow(m_floatingPreview->trackedWid());
}
}