From f277586291f365747ccdae2c82c60c9bbaab3c2f Mon Sep 17 00:00:00 2001 From: David Redondo Date: Mon, 27 Jan 2025 14:38:58 +0100 Subject: [PATCH] client: Clean up tablet_pad_group proxy While Qt cannot do anything with them right now, these are server created proxies and still need to be destroyed to be not leaked. Pick-to: 6.9 6.8 Change-Id: I5fad05c6bbb05782bb997204b3dada80ab28b98e Reviewed-by: David Edmundson --- src/plugins/platforms/wayland/qwaylandtabletv2.cpp | 7 +++++++ src/plugins/platforms/wayland/qwaylandtabletv2_p.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylandtabletv2.cpp b/src/plugins/platforms/wayland/qwaylandtabletv2.cpp index ce5261d0c62..3cfcdfe7d00 100644 --- a/src/plugins/platforms/wayland/qwaylandtabletv2.cpp +++ b/src/plugins/platforms/wayland/qwaylandtabletv2.cpp @@ -615,6 +615,13 @@ void QWaylandTabletPadV2::zwp_tablet_pad_v2_buttons(uint32_t buttons) d->buttonCount = buttons; } +void QWaylandTabletPadV2::zwp_tablet_pad_v2_group(zwp_tablet_pad_group_v2 *pad_group) +{ + // As of writing Qt does not handle tablet pads group and the controls on it + // This proxy is server created so it is just deleted here to not leak it + zwp_tablet_pad_group_v2_destroy(pad_group); +} + void QWaylandTabletPadV2::zwp_tablet_pad_v2_done() { QWindowSystemInterface::registerInputDevice(this); diff --git a/src/plugins/platforms/wayland/qwaylandtabletv2_p.h b/src/plugins/platforms/wayland/qwaylandtabletv2_p.h index f0d7cd189bb..6c8ef272723 100644 --- a/src/plugins/platforms/wayland/qwaylandtabletv2_p.h +++ b/src/plugins/platforms/wayland/qwaylandtabletv2_p.h @@ -185,7 +185,7 @@ public: ~QWaylandTabletPadV2(); protected: -// void zwp_tablet_pad_v2_group(struct ::zwp_tablet_pad_group_v2 *pad_group) override; + void zwp_tablet_pad_v2_group(struct ::zwp_tablet_pad_group_v2 *pad_group) override; void zwp_tablet_pad_v2_path(const QString &path) override; void zwp_tablet_pad_v2_buttons(uint32_t buttons) override; void zwp_tablet_pad_v2_done() override;