Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
ccc5551f
Commit
ccc5551f
authored
Apr 28, 2021
by
David Edmundson
Browse files
[Input] Unset device group user data on teardown
BUG: 436287
parent
04c3bee8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/input.cpp
View file @
ccc5551f
...
...
@@ -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
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment