mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix: 修复智能隐藏和一直隐藏模式下,点击任务栏消失的问题
监控任务栏区域鼠标点击事件,取消隐藏 Log: 修复智能隐藏和一直隐藏模式下,点击任务栏消失的问题 Influence: 任务栏智能隐藏和一直隐藏,鼠标点击任务栏查看任务栏是否隐藏了 Bug: https://pms.uniontech.com/bug-view-127241.html Change-Id: Iebf35d6564e7813d53168daddc69397936077852
This commit is contained in:
parent
576807f431
commit
1163836f16
@ -1401,9 +1401,18 @@ void MultiScreenWorker::checkXEventMonitorService()
|
||||
auto connectionInit = [ = ](XEventMonitor * eventInter, XEventMonitor * extralEventInter, XEventMonitor * touchEventInter) {
|
||||
connect(eventInter, &XEventMonitor::CursorMove, this, &MultiScreenWorker::onRegionMonitorChanged);
|
||||
connect(eventInter, &XEventMonitor::ButtonPress, this, [ = ] { setStates(MousePress, true); });
|
||||
connect(eventInter, &XEventMonitor::ButtonRelease, this, [ = ] {
|
||||
connect(eventInter, &XEventMonitor::ButtonRelease, this, [ = ](int i, int x, int y, const QString &key) {
|
||||
Q_UNUSED(i);
|
||||
Q_UNUSED(key);
|
||||
setStates(MousePress, false);
|
||||
onExtralRegionMonitorChanged(0, 0, m_extralRegisterKey);
|
||||
// 在鼠标拖动任务栏在最大尺寸的时候,如果当前任务栏为隐藏模式(一直隐藏或智能隐藏),在松开鼠标的那一刻,判断当前
|
||||
// 鼠标位置是否在任务栏外面(isCursorOut(x,y)==true),此时需要触发onExtralRegionMonitorChanged函数,
|
||||
// 目的是为了让其触发隐藏
|
||||
if (isCursorOut(x, y)
|
||||
&& (m_hideMode == HideMode::KeepHidden || m_hideMode == HideMode::SmartHide)) {
|
||||
qApp->setProperty("DRAG_STATE", false);
|
||||
onExtralRegionMonitorChanged(0, 0, m_extralRegisterKey);
|
||||
}
|
||||
});
|
||||
|
||||
connect(extralEventInter, &XEventMonitor::CursorOut, this, [ = ](int x, int y, const QString &key) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user