Merge "move popup window at item move event"

This commit is contained in:
石博文 2016-08-02 04:15:49 +00:00 committed by Deepin Code Review
commit 6825063b6a
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);