mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00

当触屏拖拽触屏按下坐标在任务栏拖拽窗口之外时,拖拽窗口不会收到触屏的mousemove事件,导致拖拽中途不刷新任务栏大小。通过转发后端触屏移动信号解决。 Log: 解决任务栏拖动改变任务栏的高度时不跟随手指移动问题 Bug: https://pms.uniontech.com/zentao/bug-view-46281.html Change-Id: I4b74614c3a830b2ed164c1b80f34a97ef8800e4a Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/3870 Reviewed-by: <mailman@uniontech.com> Reviewed-by: niecheng <niecheng@uniontech.com> Reviewed-by: fanpengcheng <fanpengcheng@uniontech.com> Tested-by: <mailman@uniontech.com>
65 lines
2.1 KiB
C++
65 lines
2.1 KiB
C++
/*
|
||
* Copyright (C) 2018 ~ 2028 Uniontech Technology Co., Ltd.
|
||
*
|
||
* Author: liuxing <liuxing@uniontech.com>
|
||
*
|
||
* Maintainer: liuxing <liuxing@uniontech.com>
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation, either version 3 of the License, or
|
||
* any later version.
|
||
*
|
||
* This program is distributed in the hope that it will be useful,
|
||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
* GNU General Public License for more details.
|
||
*
|
||
* You should have received a copy of the GNU General Public License
|
||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
*/
|
||
|
||
#ifndef TOUCHSIGNALMANAGER_H
|
||
#define TOUCHSIGNALMANAGER_H
|
||
|
||
#include <QObject>
|
||
|
||
#include <com_deepin_daemon_gesture.h>
|
||
|
||
using Gesture = com::deepin::daemon::Gesture;
|
||
|
||
class TouchSignalManager : public QObject
|
||
{
|
||
Q_OBJECT
|
||
|
||
public:
|
||
virtual ~TouchSignalManager();
|
||
static TouchSignalManager *instance();
|
||
bool isDragIconPress() const;
|
||
|
||
signals:
|
||
// 转发后端拖拽图标触控按压信号,当前设计200ms
|
||
void shortTouchPress(int time, double scaleX, double scaleY);
|
||
void touchRelease(double scaleX, double scaleY);
|
||
// 转发后端拖拽任务栏高度单指触控按压信号,当前设计1000ms
|
||
void middleTouchPress(double scaleX, double scaleY);
|
||
void touchMove(double scaleX, double scaleY);
|
||
|
||
private slots:
|
||
void dealShortTouchPress(int time, double scaleX, double scaleY);
|
||
void dealTouchRelease(double scaleX, double scaleY);
|
||
void dealMiddleTouchPress(double scaleX, double scaleY);
|
||
void dealTouchPress(int figerNum, int time, double scaleX, double scaleY);
|
||
|
||
private:
|
||
explicit TouchSignalManager(QObject *parent = nullptr);
|
||
|
||
private:
|
||
static TouchSignalManager *m_touchManager;
|
||
Gesture *m_gestureInter;
|
||
// 保存触控屏图标拖动长按状态,当前长按200ms
|
||
bool m_dragIconPressed;
|
||
};
|
||
|
||
#endif // TOUCHSIGNALMANAGER_H
|