mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix preview window hide behavior error
Change-Id: I9d8c8b9e35531a0c2aea57f6cc73313b93f7fab8
This commit is contained in:
parent
b5982c77bc
commit
d67e25f548
Notes:
Deepin Code Review
2017-05-02 10:56:34 +08:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Tue, 02 May 2017 10:56:30 +0800 Reviewed-on: https://cr.deepin.io/22712 Project: dde/dde-dock Branch: refs/heads/master
@ -58,13 +58,8 @@ void PreviewContainer::leaveEvent(QEvent *e)
|
||||
{
|
||||
QWidget::leaveEvent(e);
|
||||
|
||||
QTimer::singleShot(1, this, &PreviewContainer::onMouseLeave);
|
||||
}
|
||||
const QPoint p = mapFromGlobal(QCursor::pos()) + pos();
|
||||
|
||||
void PreviewContainer::onMouseLeave()
|
||||
{
|
||||
if (rect().contains(mapFromGlobal(QCursor::pos())))
|
||||
return;
|
||||
|
||||
emit requestCancelPreview();
|
||||
if (!rect().contains(p))
|
||||
emit requestCancelPreview();
|
||||
}
|
||||
|
@ -28,9 +28,6 @@ public slots:
|
||||
protected:
|
||||
void leaveEvent(QEvent *e);
|
||||
|
||||
private slots:
|
||||
void onMouseLeave();
|
||||
|
||||
private:
|
||||
QBoxLayout *m_windowListLayout;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user