mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix popup not hide
Change-Id: I63f02ee8763e4b950f68477adee891f1ed3ee0fd
This commit is contained in:
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
@ -304,5 +304,6 @@ void DockItem::hidePopup()
|
|||||||
m_popupShown = false;
|
m_popupShown = false;
|
||||||
PopupWindow->hide();
|
PopupWindow->hide();
|
||||||
|
|
||||||
|
emit PopupWindow->accept();
|
||||||
emit requestWindowAutoHide(true);
|
emit requestWindowAutoHide(true);
|
||||||
}
|
}
|
||||||
|
@ -86,15 +86,14 @@ void LauncherItem::resizeEvent(QResizeEvent *e)
|
|||||||
|
|
||||||
void LauncherItem::mousePressEvent(QMouseEvent *e)
|
void LauncherItem::mousePressEvent(QMouseEvent *e)
|
||||||
{
|
{
|
||||||
|
hidePopup();
|
||||||
|
|
||||||
if (e->button() == Qt::RightButton/* && !perfectIconRect().contains(e->pos())*/)
|
if (e->button() == Qt::RightButton/* && !perfectIconRect().contains(e->pos())*/)
|
||||||
return QWidget::mousePressEvent(e);
|
return QWidget::mousePressEvent(e);
|
||||||
|
|
||||||
if (e->button() != Qt::LeftButton)
|
if (e->button() != Qt::LeftButton)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// hide the tips window, because this window activate event will trigger dde-launcher auto-hide
|
|
||||||
hidePopup();
|
|
||||||
|
|
||||||
QProcess *proc = new QProcess;
|
QProcess *proc = new QProcess;
|
||||||
|
|
||||||
connect(proc, static_cast<void (QProcess::*)(int)>(&QProcess::finished), proc, &QProcess::deleteLater);
|
connect(proc, static_cast<void (QProcess::*)(int)>(&QProcess::finished), proc, &QProcess::deleteLater);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user