move popup window at item move event

Change-Id: I9cd0517c534778eff34c5b3b45e901ea32e5218b
This commit is contained in:
石博文 2016-08-02 09:43:37 +08:00
parent b16eb71984
commit 0c87333c11
Notes: Deepin Code Review 2016-08-02 04:15:49 +00:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Tue, 02 Aug 2016 04:15:49 +0000
Reviewed-on: https://cr.deepin.io/14839
Project: dde/dde-dock
Branch: refs/heads/master
2 changed files with 7 additions and 1 deletions

View File

@ -56,7 +56,7 @@ DockItem::ItemType DockItem::itemType() const
void DockItem::updatePopupPosition()
{
if (!m_popupShown)
if (!m_popupShown || !PopupWindow->isVisible())
return;
const QPoint p = popupMarkPoint();
@ -66,6 +66,11 @@ void DockItem::updatePopupPosition()
void DockItem::paintEvent(QPaintEvent *e)
{
QWidget::paintEvent(e);
}
void DockItem::moveEvent(QMoveEvent *e)
{
QWidget::moveEvent(e);
updatePopupPosition();
}

View File

@ -39,6 +39,7 @@ signals:
protected:
void paintEvent(QPaintEvent *e);
void moveEvent(QMoveEvent *e);
void mouseMoveEvent(QMouseEvent *e);
void mousePressEvent(QMouseEvent *e);
void enterEvent(QEvent *e);