fix popup not hide

Change-Id: I63f02ee8763e4b950f68477adee891f1ed3ee0fd
This commit is contained in:
石博文 2017-11-15 20:43:26 +08:00 committed by Deepin Code Review
parent 99b8549372
commit fc8e266ef7
Notes: Deepin Code Review 2017-11-16 16:36:29 +08:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Thu, 16 Nov 2017 16:36:29 +0800
Reviewed-on: https://cr.deepin.io/28517
Project: dde/dde-dock
Branch: refs/heads/master
2 changed files with 3 additions and 3 deletions

View File

@ -304,5 +304,6 @@ void DockItem::hidePopup()
m_popupShown = false;
PopupWindow->hide();
emit PopupWindow->accept();
emit requestWindowAutoHide(true);
}

View File

@ -86,15 +86,14 @@ void LauncherItem::resizeEvent(QResizeEvent *e)
void LauncherItem::mousePressEvent(QMouseEvent *e)
{
hidePopup();
if (e->button() == Qt::RightButton/* && !perfectIconRect().contains(e->pos())*/)
return QWidget::mousePressEvent(e);
if (e->button() != Qt::LeftButton)
return;
// hide the tips window, because this window activate event will trigger dde-launcher auto-hide
hidePopup();
QProcess *proc = new QProcess;
connect(proc, static_cast<void (QProcess::*)(int)>(&QProcess::finished), proc, &QProcess::deleteLater);