diff options
author | David Redondo <qt@david-redondo.de> | 2024-02-01 13:40:27 +0100 |
---|---|---|
committer | David Redondo <qt@david-redondo.de> | 2024-02-28 13:26:47 +0100 |
commit | 9aee2e4c7d388412f634f8af1015f47644290594 (patch) | |
tree | 9effa6e45e8b6e559b14e90324ebac3218780a31 /src | |
parent | 819bd4d9c0e99f1cb58acaa87321b27dfff936d3 (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.
Pick-to: 6.7
Change-Id: I0b9d1914ea6a9e7b379fad905a319bde5fd7f136
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src')
-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 988e37e30..6f421febd 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -448,9 +448,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(); |