From 3783016b7208493fe02ef1d0199b1a2a35149d1a Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 10 Jul 2023 22:24:28 +0100 Subject: [PATCH] client: Port QWaylandInputDevice to support QT_NO_CONTEXTLESS_CONNECT There were two existing usages of the 3-arg connect, but the timer is always scoped to be shorter than the receiver so it was previously safe. Change-Id: I0bb5a38fed997cbb68e49defc51972894f5239ee Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Ahmad Samir --- src/plugins/platforms/wayland/qwaylandinputdevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp index dc59a237697..c4629905743 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp +++ b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp @@ -64,7 +64,7 @@ QWaylandInputDevice::Keyboard::Keyboard(QWaylandInputDevice *p) : mParent(p) { init(p->get_keyboard()); - mRepeatTimer.callOnTimeout([&]() { + mRepeatTimer.callOnTimeout(this, [&]() { if (!focusWindow()) { // We destroyed the keyboard focus surface, but the server didn't get the message yet... // or the server didn't send an enter event first. @@ -132,7 +132,7 @@ QWaylandInputDevice::Pointer::Pointer(QWaylandInputDevice *seat) } mCursor.frameTimer.setSingleShot(true); - mCursor.frameTimer.callOnTimeout([&]() { + mCursor.frameTimer.callOnTimeout(this, [&]() { cursorTimerCallback(); }); #endif