libinput: fix pad groups not being ref'd (#227)

Without refing pad groups they would get destroyed when the current
event gets out of scope, causing a segfault when destroying a
CLibinputTabletPad.
This commit is contained in:
Maxime Nordier 2025-12-29 17:15:02 +01:00 committed by GitHub
parent 96b53bcb42
commit b8a0c5ba5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1140,6 +1140,7 @@ const std::string& Aquamarine::CLibinputTabletPad::getName() {
SP<ITabletPad::STabletPadGroup> Aquamarine::CLibinputTabletPad::createGroupFromID(int id) {
auto libinputGroup = libinput_device_tablet_pad_get_mode_group(device->device, id);
libinput_tablet_pad_mode_group_ref(libinputGroup);
auto group = makeShared<STabletPadGroup>();
for (size_t i = 0; i < rings; ++i) {