mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix(dock):fix appicon repeat open many instance
This commit is contained in:
parent
5af3d29355
commit
c3d1629ff8
@ -80,6 +80,7 @@ AppItem::AppItem(const QDBusObjectPath &entry, QWidget *parent)
|
||||
m_dragging(false),
|
||||
|
||||
m_retryTimes(0),
|
||||
m_lastclickTimes(0),
|
||||
|
||||
m_appIcon(QPixmap()),
|
||||
|
||||
@ -306,6 +307,11 @@ void AppItem::mouseReleaseEvent(QMouseEvent *e)
|
||||
qDebug() << "app item clicked, name:" << m_itemEntryInter->name()
|
||||
<< "id:" << m_itemEntryInter->id() << "my-id:" << m_id << "icon:" << m_itemEntryInter->icon();
|
||||
|
||||
int curTimestamp = QX11Info::getTimestamp();
|
||||
if ((curTimestamp - m_lastclickTimes) < 200)
|
||||
return;
|
||||
|
||||
m_lastclickTimes = curTimestamp;
|
||||
m_itemEntryInter->Activate(QX11Info::getTimestamp());
|
||||
|
||||
// play launch effect
|
||||
|
@ -113,6 +113,7 @@ private:
|
||||
bool m_dragging;
|
||||
bool m_active;
|
||||
int m_retryTimes;
|
||||
unsigned long m_lastclickTimes;
|
||||
|
||||
WindowInfoMap m_windowInfos;
|
||||
QString m_id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user