Commit ccc5551f authored by David Edmundson's avatar David Edmundson
Browse files

[Input] Unset device group user data on teardown

BUG: 436287
parent 04c3bee8
......@@ -1612,7 +1612,14 @@ public:
tabletSeat->addTabletPad(device->sysName(), device->name(), {QString::fromUtf8(devnode)}, buttonsCount, ringsCount, stripsCount, modes, libinput_tablet_pad_mode_group_get_mode(firstGroup), tablet);
}
}
void removeDevice(const QString &sysname)
void removeDevice(LibInput::Device *device)
{
auto deviceGroup = libinput_device_get_device_group(device->device());
libinput_device_group_set_user_data(deviceGroup, nullptr);
}
void removeDeviceBySysName(const QString &sysname)
{
KWaylandServer::TabletSeatV2Interface *tabletSeat = findTabletSeat();
if (tabletSeat)
......@@ -2258,7 +2265,9 @@ void InputRedirection::setupInputFilters()
m_tabletSupport->integrateDevice(dev);
}
connect(m_libInput, &LibInput::Connection::deviceAdded, m_tabletSupport, &TabletInputFilter::integrateDevice);
connect(m_libInput, &LibInput::Connection::deviceRemovedSysName, m_tabletSupport, &TabletInputFilter::removeDevice);
connect(m_libInput, &LibInput::Connection::deviceRemoved, m_tabletSupport, &TabletInputFilter::removeDevice);
connect(m_libInput, &LibInput::Connection::deviceRemovedSysName, m_tabletSupport, &TabletInputFilter::removeDeviceBySysName);
installInputEventFilter(m_tabletSupport);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment