mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: 修改任务栏图标响应鼠标左键时获取时间戳的方法
在wayland环境下,无法通过QX11Info::getTimestamp()获取到时间戳, 从而导致dock栏应用图标响应鼠标左键的逻辑直接return。 Log: 修复任务栏应用不能通过左键打开的问题 Bug: https://pms.uniontech.com/zentao/bug-view-96031.html Influence: wayland适配 Change-Id: I4134110069da8fe7db8759efe9a3b30c9b3d535a # Conflicts: # frame/item/appitem.cpp
This commit is contained in:
parent
f8984e9c61
commit
5aaf8be947
@ -299,8 +299,9 @@ void AppItem::mouseReleaseEvent(QMouseEvent *e)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int curTimestamp = QDateTime::currentSecsSinceEpoch();
|
// 获取时间戳qint64转quint64,是不存在任何问题的
|
||||||
if ((curTimestamp - m_lastclickTimes) < 1)
|
quint64 curTimestamp = QDateTime::currentDateTime().toMSecsSinceEpoch();
|
||||||
|
if ((curTimestamp - m_lastclickTimes) < 300)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_lastclickTimes = curTimestamp;
|
m_lastclickTimes = curTimestamp;
|
||||||
|
@ -124,7 +124,7 @@ private:
|
|||||||
bool m_active;
|
bool m_active;
|
||||||
int m_retryTimes;
|
int m_retryTimes;
|
||||||
bool m_iconValid;
|
bool m_iconValid;
|
||||||
unsigned long m_lastclickTimes;
|
quint64 m_lastclickTimes;
|
||||||
|
|
||||||
WindowInfoMap m_windowInfos;
|
WindowInfoMap m_windowInfos;
|
||||||
QString m_id;
|
QString m_id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user