Be consistent about touch point id type: use qint32

Summary:
There is no point in using quint32 and casting back and forth in numerous places.
Fix a bunch of compiler warnings that we implicitly cast between signed and unsigned.
This makes things consistent with what we get from libinput.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: zzag, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23086
This commit is contained in:
Frederik Gladhorn 2019-08-11 21:57:45 +02:00
parent ed4a9d756a
commit 12886cf442
20 changed files with 90 additions and 90 deletions

View file

@ -299,7 +299,7 @@ void DebugConsoleFilter::keyEvent(KeyEvent *event)
m_textEdit->ensureCursorVisible();
}
void DebugConsoleFilter::touchDown(quint32 id, const QPointF &pos, quint32 time)
void DebugConsoleFilter::touchDown(qint32 id, const QPointF &pos, quint32 time)
{
QString text = s_hr;
text.append(s_tableStart);
@ -314,7 +314,7 @@ void DebugConsoleFilter::touchDown(quint32 id, const QPointF &pos, quint32 time)
m_textEdit->ensureCursorVisible();
}
void DebugConsoleFilter::touchMotion(quint32 id, const QPointF &pos, quint32 time)
void DebugConsoleFilter::touchMotion(qint32 id, const QPointF &pos, quint32 time)
{
QString text = s_hr;
text.append(s_tableStart);
@ -329,7 +329,7 @@ void DebugConsoleFilter::touchMotion(quint32 id, const QPointF &pos, quint32 tim
m_textEdit->ensureCursorVisible();
}
void DebugConsoleFilter::touchUp(quint32 id, quint32 time)
void DebugConsoleFilter::touchUp(qint32 id, quint32 time)
{
QString text = s_hr;
text.append(s_tableStart);

View file

@ -136,9 +136,9 @@ public:
void pointerEvent(MouseEvent *event) override;
void wheelEvent(WheelEvent *event) override;
void keyEvent(KeyEvent *event) override;
void touchDown(quint32 id, const QPointF &pos, quint32 time) override;
void touchMotion(quint32 id, const QPointF &pos, quint32 time) override;
void touchUp(quint32 id, quint32 time) override;
void touchDown(qint32 id, const QPointF &pos, quint32 time) override;
void touchMotion(qint32 id, const QPointF &pos, quint32 time) override;
void touchUp(qint32 id, quint32 time) override;
void pinchGestureBegin(int fingerCount, quint32 time) override;
void pinchGestureUpdate(qreal scale, qreal angleDelta, const QSizeF &delta, quint32 time) override;

View file

@ -732,7 +732,7 @@ bool EffectsHandlerImpl::isMouseInterception() const
}
bool EffectsHandlerImpl::touchDown(quint32 id, const QPointF &pos, quint32 time)
bool EffectsHandlerImpl::touchDown(qint32 id, const QPointF &pos, quint32 time)
{
// TODO: reverse call order?
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
@ -743,7 +743,7 @@ bool EffectsHandlerImpl::touchDown(quint32 id, const QPointF &pos, quint32 time)
return false;
}
bool EffectsHandlerImpl::touchMotion(quint32 id, const QPointF &pos, quint32 time)
bool EffectsHandlerImpl::touchMotion(qint32 id, const QPointF &pos, quint32 time)
{
// TODO: reverse call order?
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
@ -754,7 +754,7 @@ bool EffectsHandlerImpl::touchMotion(quint32 id, const QPointF &pos, quint32 tim
return false;
}
bool EffectsHandlerImpl::touchUp(quint32 id, quint32 time)
bool EffectsHandlerImpl::touchUp(qint32 id, quint32 time)
{
// TODO: reverse call order?
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {

View file

@ -252,9 +252,9 @@ public:
return m_scene;
}
bool touchDown(quint32 id, const QPointF &pos, quint32 time);
bool touchMotion(quint32 id, const QPointF &pos, quint32 time);
bool touchUp(quint32 id, quint32 time);
bool touchDown(qint32 id, const QPointF &pos, quint32 time);
bool touchMotion(qint32 id, const QPointF &pos, quint32 time);
bool touchUp(qint32 id, quint32 time);
void highlightWindows(const QVector<EffectWindow *> &windows);

View file

@ -646,7 +646,7 @@ void PresentWindowsEffect::inputEventUpdate(const QPoint &pos, QEvent::Type type
setHighlightedWindow(highlightCandidate);
}
bool PresentWindowsEffect::touchDown(quint32 id, const QPointF &pos, quint32 time)
bool PresentWindowsEffect::touchDown(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(time)
if (!m_activated) {
@ -661,7 +661,7 @@ bool PresentWindowsEffect::touchDown(quint32 id, const QPointF &pos, quint32 tim
return true;
}
bool PresentWindowsEffect::touchMotion(quint32 id, const QPointF &pos, quint32 time)
bool PresentWindowsEffect::touchMotion(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(time)
@ -675,7 +675,7 @@ bool PresentWindowsEffect::touchMotion(quint32 id, const QPointF &pos, quint32 t
return true;
}
bool PresentWindowsEffect::touchUp(quint32 id, quint32 time)
bool PresentWindowsEffect::touchUp(qint32 id, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(time)

View file

@ -127,9 +127,9 @@ public:
void grabbedKeyboardEvent(QKeyEvent *e) override;
bool isActive() const override;
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override;
bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override;
bool touchUp(quint32 id, quint32 time) override;
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override;
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override;
bool touchUp(qint32 id, quint32 time) override;
int requestedEffectChainPosition() const override {
return 70;
@ -338,7 +338,7 @@ private:
EffectWindow* m_closeWindow;
Qt::Corner m_closeButtonCorner;
struct {
quint32 id = 0;
qint32 id = 0;
bool active = false;
} m_touch;

View file

@ -72,7 +72,7 @@ Qt::GlobalColor TouchPointsEffect::colorForId(quint32 id)
return s_colors[s_colorIndex];
}
bool TouchPointsEffect::touchDown(quint32 id, const QPointF &pos, quint32 time)
bool TouchPointsEffect::touchDown(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(time)
TouchPoint point;
@ -85,7 +85,7 @@ bool TouchPointsEffect::touchDown(quint32 id, const QPointF &pos, quint32 time)
return false;
}
bool TouchPointsEffect::touchMotion(quint32 id, const QPointF &pos, quint32 time)
bool TouchPointsEffect::touchMotion(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(time)
TouchPoint point;
@ -98,7 +98,7 @@ bool TouchPointsEffect::touchMotion(quint32 id, const QPointF &pos, quint32 time
return false;
}
bool TouchPointsEffect::touchUp(quint32 id, quint32 time)
bool TouchPointsEffect::touchUp(qint32 id, quint32 time)
{
Q_UNUSED(time)
auto it = m_latestPositions.constFind(id);

View file

@ -42,9 +42,9 @@ public:
void paintScreen(int mask, QRegion region, ScreenPaintData& data) override;
void postPaintScreen() override;
bool isActive() const override;
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override;
bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override;
bool touchUp(quint32 id, quint32 time) override;
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override;
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override;
bool touchUp(qint32 id, quint32 time) override;
// for properties
qreal lineWidth() const {

View file

@ -92,7 +92,7 @@ bool InputEventFilter::keyEvent(QKeyEvent *event)
return false;
}
bool InputEventFilter::touchDown(quint32 id, const QPointF &point, quint32 time)
bool InputEventFilter::touchDown(qint32 id, const QPointF &point, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(point)
@ -100,7 +100,7 @@ bool InputEventFilter::touchDown(quint32 id, const QPointF &point, quint32 time)
return false;
}
bool InputEventFilter::touchMotion(quint32 id, const QPointF &point, quint32 time)
bool InputEventFilter::touchMotion(qint32 id, const QPointF &point, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(point)
@ -108,7 +108,7 @@ bool InputEventFilter::touchMotion(quint32 id, const QPointF &point, quint32 tim
return false;
}
bool InputEventFilter::touchUp(quint32 id, quint32 time)
bool InputEventFilter::touchUp(qint32 id, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(time)
@ -293,7 +293,7 @@ public:
}
return true;
}
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override {
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override {
if (!waylandServer()->isScreenLocked()) {
return false;
}
@ -304,7 +304,7 @@ public:
}
return true;
}
bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override {
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override {
if (!waylandServer()->isScreenLocked()) {
return false;
}
@ -318,7 +318,7 @@ public:
}
return true;
}
bool touchUp(quint32 id, quint32 time) override {
bool touchUp(qint32 id, quint32 time) override {
if (!waylandServer()->isScreenLocked()) {
return false;
}
@ -419,19 +419,19 @@ public:
static_cast< EffectsHandlerImpl* >(effects)->grabbedKeyboardEvent(event);
return true;
}
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override {
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override {
if (!effects) {
return false;
}
return static_cast< EffectsHandlerImpl* >(effects)->touchDown(id, pos, time);
}
bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override {
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override {
if (!effects) {
return false;
}
return static_cast< EffectsHandlerImpl* >(effects)->touchMotion(id, pos, time);
}
bool touchUp(quint32 id, quint32 time) override {
bool touchUp(qint32 id, quint32 time) override {
if (!effects) {
return false;
}
@ -481,7 +481,7 @@ public:
return true;
}
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override {
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override {
Q_UNUSED(id)
Q_UNUSED(pos)
Q_UNUSED(time)
@ -492,7 +492,7 @@ public:
return true;
}
bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override {
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override {
Q_UNUSED(time)
AbstractClient *c = workspace()->moveResizeClient();
if (!c) {
@ -508,7 +508,7 @@ public:
return true;
}
bool touchUp(quint32 id, quint32 time) override {
bool touchUp(qint32 id, quint32 time) override {
Q_UNUSED(time)
AbstractClient *c = workspace()->moveResizeClient();
if (!c) {
@ -524,7 +524,7 @@ public:
return true;
}
private:
quint32 m_id = 0;
qint32 m_id = 0;
bool m_set = false;
};
@ -598,7 +598,7 @@ public:
return true;
}
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override {
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override {
Q_UNUSED(time)
if (!isActive()) {
return false;
@ -607,7 +607,7 @@ public:
return true;
}
bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override {
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override {
Q_UNUSED(time)
if (!isActive()) {
return false;
@ -619,7 +619,7 @@ public:
return true;
}
bool touchUp(quint32 id, quint32 time) override {
bool touchUp(qint32 id, quint32 time) override {
Q_UNUSED(time)
if (!isActive()) {
return false;
@ -917,7 +917,7 @@ class InternalWindowEventFilter : public InputEventFilter {
return false;
}
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override {
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override {
auto seat = waylandServer()->seat();
if (seat->isTouchSequence()) {
// something else is getting the events
@ -947,7 +947,7 @@ class InternalWindowEventFilter : public InputEventFilter {
QCoreApplication::sendEvent(internal.data(), &e);
return true;
}
bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override {
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override {
auto touch = input()->touch();
auto internal = touch->internalWindow();
if (!internal) {
@ -968,7 +968,7 @@ class InternalWindowEventFilter : public InputEventFilter {
QCoreApplication::instance()->sendEvent(internal.data(), &e);
return true;
}
bool touchUp(quint32 id, quint32 time) override {
bool touchUp(qint32 id, quint32 time) override {
auto touch = input()->touch();
auto internal = touch->internalWindow();
if (!internal) {
@ -1070,7 +1070,7 @@ public:
}
return true;
}
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override {
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override {
auto seat = waylandServer()->seat();
if (seat->isTouchSequence()) {
return false;
@ -1100,7 +1100,7 @@ public:
}
return true;
}
bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override {
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override {
Q_UNUSED(time)
auto decoration = input()->touch()->decoration();
if (!decoration) {
@ -1121,7 +1121,7 @@ public:
decoration->client()->processDecorationMove(m_lastLocalTouchPos.toPoint(), pos.toPoint());
return true;
}
bool touchUp(quint32 id, quint32 time) override {
bool touchUp(qint32 id, quint32 time) override {
Q_UNUSED(time);
auto decoration = input()->touch()->decoration();
if (!decoration) {
@ -1201,7 +1201,7 @@ public:
// always forward
return false;
}
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override {
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override {
Q_UNUSED(time)
// TODO: better check whether a touch sequence is in progress
if (m_touchInProgress || waylandServer()->seat()->isTouchSequence()) {
@ -1219,7 +1219,7 @@ public:
}
return false;
}
bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override {
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override {
Q_UNUSED(time)
if (m_touchInProgress && m_id == id) {
ScreenEdges::self()->gestureRecognizer()->updateSwipeGesture(QSizeF(pos.x() - m_lastPos.x(), pos.y() - m_lastPos.y()));
@ -1228,7 +1228,7 @@ public:
}
return false;
}
bool touchUp(quint32 id, quint32 time) override {
bool touchUp(qint32 id, quint32 time) override {
Q_UNUSED(time)
if (m_touchInProgress && m_id == id) {
ScreenEdges::self()->gestureRecognizer()->endSwipeGesture();
@ -1239,7 +1239,7 @@ public:
}
private:
bool m_touchInProgress = false;
quint32 m_id = 0;
qint32 m_id = 0;
QPointF m_lastPos;
};
@ -1280,7 +1280,7 @@ public:
}
return false;
}
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override {
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override {
Q_UNUSED(id)
Q_UNUSED(time)
auto seat = waylandServer()->seat();
@ -1369,7 +1369,7 @@ public:
passToWaylandServer(event);
return true;
}
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override {
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override {
if (!workspace()) {
return false;
}
@ -1378,7 +1378,7 @@ public:
input()->touch()->insertId(id, seat->touchDown(pos));
return true;
}
bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override {
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override {
if (!workspace()) {
return false;
}
@ -1390,7 +1390,7 @@ public:
}
return true;
}
bool touchUp(quint32 id, quint32 time) override {
bool touchUp(qint32 id, quint32 time) override {
if (!workspace()) {
return false;
}
@ -1534,7 +1534,7 @@ public:
return true;
}
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override {
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override {
auto seat = waylandServer()->seat();
if (seat->isDragPointer()) {
return true;
@ -1549,7 +1549,7 @@ public:
input()->touch()->insertId(id, seat->touchDown(pos));
return true;
}
bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override {
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override {
auto seat = waylandServer()->seat();
if (seat->isDragPointer()) {
return true;
@ -1588,7 +1588,7 @@ public:
}
return true;
}
bool touchUp(quint32 id, quint32 time) override {
bool touchUp(qint32 id, quint32 time) override {
auto seat = waylandServer()->seat();
if (!seat->isDragTouch()) {
return false;
@ -1749,21 +1749,21 @@ void InputRedirection::setupWorkspace()
}
);
connect(device, &FakeInputDevice::touchDownRequested, this,
[this] (quint32 id, const QPointF &pos) {
[this] (qint32 id, const QPointF &pos) {
// TODO: Fix time
m_touch->processDown(id, pos, 0);
waylandServer()->simulateUserActivity();
}
);
connect(device, &FakeInputDevice::touchMotionRequested, this,
[this] (quint32 id, const QPointF &pos) {
[this] (qint32 id, const QPointF &pos) {
// TODO: Fix time
m_touch->processMotion(id, pos, 0);
waylandServer()->simulateUserActivity();
}
);
connect(device, &FakeInputDevice::touchUpRequested, this,
[this] (quint32 id) {
[this] (qint32 id) {
// TODO: Fix time
m_touch->processUp(id, 0);
waylandServer()->simulateUserActivity();

View file

@ -354,9 +354,9 @@ public:
* @return @c tru to stop further event processing, @c false to pass to next filter.
*/
virtual bool keyEvent(QKeyEvent *event);
virtual bool touchDown(quint32 id, const QPointF &pos, quint32 time);
virtual bool touchMotion(quint32 id, const QPointF &pos, quint32 time);
virtual bool touchUp(quint32 id, quint32 time);
virtual bool touchDown(qint32 id, const QPointF &pos, quint32 time);
virtual bool touchMotion(qint32 id, const QPointF &pos, quint32 time);
virtual bool touchUp(qint32 id, quint32 time);
virtual bool pinchGestureBegin(int fingerCount, quint32 time);
virtual bool pinchGestureUpdate(qreal scale, qreal angleDelta, const QSizeF &delta, quint32 time);

View file

@ -50,21 +50,21 @@ void InputEventSpy::keyEvent(KeyEvent *event)
Q_UNUSED(event)
}
void InputEventSpy::touchDown(quint32 id, const QPointF &point, quint32 time)
void InputEventSpy::touchDown(qint32 id, const QPointF &point, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(point)
Q_UNUSED(time)
}
void InputEventSpy::touchMotion(quint32 id, const QPointF &point, quint32 time)
void InputEventSpy::touchMotion(qint32 id, const QPointF &point, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(point)
Q_UNUSED(time)
}
void InputEventSpy::touchUp(quint32 id, quint32 time)
void InputEventSpy::touchUp(qint32 id, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(time)

View file

@ -68,9 +68,9 @@ public:
* @param event The event information about the key event
*/
virtual void keyEvent(KeyEvent *event);
virtual void touchDown(quint32 id, const QPointF &pos, quint32 time);
virtual void touchMotion(quint32 id, const QPointF &pos, quint32 time);
virtual void touchUp(quint32 id, quint32 time);
virtual void touchDown(qint32 id, const QPointF &pos, quint32 time);
virtual void touchMotion(qint32 id, const QPointF &pos, quint32 time);
virtual void touchUp(qint32 id, quint32 time);
virtual void pinchGestureBegin(int fingerCount, quint32 time);
virtual void pinchGestureUpdate(qreal scale, qreal angleDelta, const QSizeF &delta, quint32 time);

View file

@ -682,7 +682,7 @@ xcb_window_t Effect::x11RootWindow() const
return effects->x11RootWindow();
}
bool Effect::touchDown(quint32 id, const QPointF &pos, quint32 time)
bool Effect::touchDown(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(pos)
@ -690,7 +690,7 @@ bool Effect::touchDown(quint32 id, const QPointF &pos, quint32 time)
return false;
}
bool Effect::touchMotion(quint32 id, const QPointF &pos, quint32 time)
bool Effect::touchMotion(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(pos)
@ -698,7 +698,7 @@ bool Effect::touchMotion(quint32 id, const QPointF &pos, quint32 time)
return false;
}
bool Effect::touchUp(quint32 id, quint32 time)
bool Effect::touchUp(qint32 id, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(time)

View file

@ -591,7 +591,7 @@ public:
* @see touchUp
* @since 5.8
*/
virtual bool touchDown(quint32 id, const QPointF &pos, quint32 time);
virtual bool touchDown(qint32 id, const QPointF &pos, quint32 time);
/**
* A touch point moved.
*
@ -611,7 +611,7 @@ public:
* @see touchUp
* @since 5.8
*/
virtual bool touchMotion(quint32 id, const QPointF &pos, quint32 time);
virtual bool touchMotion(qint32 id, const QPointF &pos, quint32 time);
/**
* A touch point was released.
*
@ -630,7 +630,7 @@ public:
* @see touchMotion
* @since 5.8
*/
virtual bool touchUp(quint32 id, quint32 time);
virtual bool touchUp(qint32 id, quint32 time);
static QPoint cursorPos();

View file

@ -58,7 +58,7 @@ bool DpmsInputEventFilter::keyEvent(QKeyEvent *event)
return true;
}
bool DpmsInputEventFilter::touchDown(quint32 id, const QPointF &pos, quint32 time)
bool DpmsInputEventFilter::touchDown(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(pos)
Q_UNUSED(time)
@ -83,7 +83,7 @@ bool DpmsInputEventFilter::touchDown(quint32 id, const QPointF &pos, quint32 tim
return true;
}
bool DpmsInputEventFilter::touchUp(quint32 id, quint32 time)
bool DpmsInputEventFilter::touchUp(qint32 id, quint32 time)
{
m_touchPoints.removeAll(id);
if (m_touchPoints.isEmpty() && m_doubleTapTimer.isValid() && m_secondTap) {
@ -97,7 +97,7 @@ bool DpmsInputEventFilter::touchUp(quint32 id, quint32 time)
return true;
}
bool DpmsInputEventFilter::touchMotion(quint32 id, const QPointF &pos, quint32 time)
bool DpmsInputEventFilter::touchMotion(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(pos)

View file

@ -37,9 +37,9 @@ public:
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override;
bool wheelEvent(QWheelEvent *event) override;
bool keyEvent(QKeyEvent *event) override;
bool touchDown(quint32 id, const QPointF &pos, quint32 time) override;
bool touchMotion(quint32 id, const QPointF &pos, quint32 time) override;
bool touchUp(quint32 id, quint32 time) override;
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override;
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override;
bool touchUp(qint32 id, quint32 time) override;
private:
void notify();

View file

@ -36,7 +36,7 @@ void TouchHideCursorSpy::wheelEvent(KWin::WheelEvent *event)
showCursor();
}
void TouchHideCursorSpy::touchDown(quint32 id, const QPointF &pos, quint32 time)
void TouchHideCursorSpy::touchDown(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(pos)

View file

@ -28,7 +28,7 @@ class TouchHideCursorSpy : public InputEventSpy
public:
void pointerEvent(KWin::MouseEvent *event) override;
void wheelEvent(KWin::WheelEvent *event) override;
void touchDown(quint32 id, const QPointF &pos, quint32 time) override;
void touchDown(qint32 id, const QPointF &pos, quint32 time) override;
private:
void showCursor();

View file

@ -148,12 +148,12 @@ void TouchInputRedirection::cleanupDecoration(Decoration::DecoratedClientImpl *o
// nothing to do
}
void TouchInputRedirection::insertId(quint32 internalId, qint32 kwaylandId)
void TouchInputRedirection::insertId(qint32 internalId, qint32 kwaylandId)
{
m_idMapper.insert(internalId, kwaylandId);
}
qint32 TouchInputRedirection::mappedId(quint32 internalId)
qint32 TouchInputRedirection::mappedId(qint32 internalId)
{
auto it = m_idMapper.constFind(internalId);
if (it != m_idMapper.constEnd()) {
@ -162,7 +162,7 @@ qint32 TouchInputRedirection::mappedId(quint32 internalId)
return -1;
}
void TouchInputRedirection::removeId(quint32 internalId)
void TouchInputRedirection::removeId(qint32 internalId)
{
m_idMapper.remove(internalId);
}

View file

@ -60,9 +60,9 @@ public:
void cancel();
void frame();
void insertId(quint32 internalId, qint32 kwaylandId);
void removeId(quint32 internalId);
qint32 mappedId(quint32 internalId);
void insertId(qint32 internalId, qint32 kwaylandId);
void removeId(qint32 internalId);
qint32 mappedId(qint32 internalId);
void setDecorationPressId(qint32 id) {
m_decorationId = id;