Changeset View
Changeset View
Standalone View
Standalone View
pointer_input.cpp
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Line(s) | 121 | { | |||
---|---|---|---|---|---|
157 | 157 | | |||
158 | // warp the cursor to center of screen | 158 | // warp the cursor to center of screen | ||
159 | warp(screens()->geometry().center()); | 159 | warp(screens()->geometry().center()); | ||
160 | updateAfterScreenChange(); | 160 | updateAfterScreenChange(); | ||
161 | } | 161 | } | ||
162 | 162 | | |||
163 | void PointerInputRedirection::processMotion(const QPointF &pos, uint32_t time, LibInput::Device *device) | 163 | void PointerInputRedirection::processMotion(const QPointF &pos, uint32_t time, LibInput::Device *device) | ||
164 | { | 164 | { | ||
165 | processMotion(pos, QSizeF(), QSizeF(), time, 0, device); | ||||
166 | } | ||||
167 | | ||||
168 | void PointerInputRedirection::processMotion(const QPointF &pos, const QSizeF &delta, const QSizeF &deltaNonAccelerated, uint32_t time, quint64 timeUsec, LibInput::Device *device) | ||||
169 | { | ||||
165 | if (!m_inited) { | 170 | if (!m_inited) { | ||
166 | return; | 171 | return; | ||
167 | } | 172 | } | ||
168 | updatePosition(pos); | 173 | updatePosition(pos); | ||
169 | MouseEvent event(QEvent::MouseMove, m_pos, Qt::NoButton, m_qtButtons, | 174 | MouseEvent event(QEvent::MouseMove, m_pos, Qt::NoButton, m_qtButtons, | ||
170 | m_input->keyboardModifiers(), time, device); | 175 | m_input->keyboardModifiers(), time, | ||
176 | delta, deltaNonAccelerated, timeUsec, device); | ||||
171 | 177 | | |||
172 | const auto &filters = m_input->filters(); | 178 | const auto &filters = m_input->filters(); | ||
173 | for (auto it = filters.begin(), end = filters.end(); it != end; it++) { | 179 | for (auto it = filters.begin(), end = filters.end(); it != end; it++) { | ||
174 | if ((*it)->pointerEvent(&event, 0)) { | 180 | if ((*it)->pointerEvent(&event, 0)) { | ||
175 | return; | 181 | return; | ||
176 | } | 182 | } | ||
177 | } | 183 | } | ||
178 | } | 184 | } | ||
Show All 15 Lines | 199 | case InputRedirection::PointerButtonPressed: | |||
194 | type = QEvent::MouseButtonPress; | 200 | type = QEvent::MouseButtonPress; | ||
195 | break; | 201 | break; | ||
196 | default: | 202 | default: | ||
197 | Q_UNREACHABLE(); | 203 | Q_UNREACHABLE(); | ||
198 | return; | 204 | return; | ||
199 | } | 205 | } | ||
200 | 206 | | |||
201 | MouseEvent event(type, m_pos, buttonToQtMouseButton(button), m_qtButtons, | 207 | MouseEvent event(type, m_pos, buttonToQtMouseButton(button), m_qtButtons, | ||
202 | m_input->keyboardModifiers(), time, device); | 208 | m_input->keyboardModifiers(), time, QSizeF(), QSizeF(), 0, device); | ||
203 | 209 | | |||
204 | const auto &filters = m_input->filters(); | 210 | const auto &filters = m_input->filters(); | ||
205 | for (auto it = filters.begin(), end = filters.end(); it != end; it++) { | 211 | for (auto it = filters.begin(), end = filters.end(); it != end; it++) { | ||
206 | if ((*it)->pointerEvent(&event, button)) { | 212 | if ((*it)->pointerEvent(&event, button)) { | ||
207 | return; | 213 | return; | ||
208 | } | 214 | } | ||
209 | } | 215 | } | ||
210 | } | 216 | } | ||
▲ Show 20 Lines • Show All 758 Lines • Show Last 20 Lines |