Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_inputeventfilter.cpp
Show All 13 Lines | |||||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #include "drm_inputeventfilter.h" | 20 | #include "drm_inputeventfilter.h" | ||
21 | #include "drm_backend.h" | 21 | #include "drm_backend.h" | ||
22 | #include "wayland_server.h" | ||||
22 | 23 | | |||
23 | #include <QApplication> | 24 | #include <QApplication> | ||
24 | 25 | | |||
26 | #include <KWayland/Server/seat_interface.h> | ||||
27 | | ||||
25 | namespace KWin | 28 | namespace KWin | ||
26 | { | 29 | { | ||
27 | 30 | | |||
28 | DpmsInputEventFilter::DpmsInputEventFilter(DrmBackend *backend) | 31 | DpmsInputEventFilter::DpmsInputEventFilter(DrmBackend *backend) | ||
29 | : InputEventFilter() | 32 | : InputEventFilter() | ||
30 | , m_backend(backend) | 33 | , m_backend(backend) | ||
31 | { | 34 | { | ||
32 | } | 35 | } | ||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 77 | } else { | |||
77 | m_secondTap = false; | 80 | m_secondTap = false; | ||
78 | } | 81 | } | ||
79 | m_touchPoints << id; | 82 | m_touchPoints << id; | ||
80 | return true; | 83 | return true; | ||
81 | } | 84 | } | ||
82 | 85 | | |||
83 | bool DpmsInputEventFilter::touchUp(quint32 id, quint32 time) | 86 | bool DpmsInputEventFilter::touchUp(quint32 id, quint32 time) | ||
84 | { | 87 | { | ||
85 | Q_UNUSED(time) | | |||
86 | m_touchPoints.removeAll(id); | 88 | m_touchPoints.removeAll(id); | ||
87 | if (m_touchPoints.isEmpty() && m_doubleTapTimer.isValid() && m_secondTap) { | 89 | if (m_touchPoints.isEmpty() && m_doubleTapTimer.isValid() && m_secondTap) { | ||
88 | if (m_doubleTapTimer.elapsed() < qApp->doubleClickInterval()) { | 90 | if (m_doubleTapTimer.elapsed() < qApp->doubleClickInterval()) { | ||
91 | waylandServer()->seat()->setTimestamp(time); | ||||
89 | notify(); | 92 | notify(); | ||
90 | } | 93 | } | ||
91 | m_doubleTapTimer.invalidate(); | 94 | m_doubleTapTimer.invalidate(); | ||
92 | m_secondTap = false; | 95 | m_secondTap = false; | ||
93 | } | 96 | } | ||
94 | return true; | 97 | return true; | ||
95 | } | 98 | } | ||
96 | 99 | | |||
Show All 16 Lines |