diff options
author | David Redondo <qt@david-redondo.de> | 2024-02-01 13:40:27 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-02-28 14:43:14 +0000 |
commit | a3e176eee63c516363a4a398aa65099530d1c68c (patch) | |
tree | 8ef13910fb5aa6935bea4c4372ebcc9d370e4fb8 | |
parent | 5539bc8ce3ff1d2e5f6e78be4185e0cac4615218 (diff) |
Do not create new wl_pointer objects when creating pointer gestures
get_pointer is the method belonging to QtWayland::wl_seat creating new
wl_pointer instead of using the already existing one. Since they were
tracked nowhere they where also leaked.
Change-Id: I0b9d1914ea6a9e7b379fad905a319bde5fd7f136
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit 9aee2e4c7d388412f634f8af1015f47644290594)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/client/qwaylandinputdevice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index 2a04f6011..13b7da077 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -443,9 +443,9 @@ void QWaylandInputDevice::seat_capabilities(uint32_t caps) MaxTouchPoints, 0, QString(), QPointingDeviceUniqueId(), this); QWindowSystemInterface::registerInputDevice(mTouchPadDevice); mPointerGesturePinch.reset(pointerGestures->createPointerGesturePinch(this)); - mPointerGesturePinch->init(pointerGestures->get_pinch_gesture(get_pointer())); + mPointerGesturePinch->init(pointerGestures->get_pinch_gesture(mPointer->object())); mPointerGestureSwipe.reset(pointerGestures->createPointerGestureSwipe(this)); - mPointerGestureSwipe->init(pointerGestures->get_swipe_gesture(get_pointer())); + mPointerGestureSwipe->init(pointerGestures->get_swipe_gesture(mPointer->object())); } } else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && mPointer) { mPointer.reset(); |