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
264bb6c5
Commit
264bb6c5
authored
Mar 14, 2021
by
Xaver Hugl
Browse files
Consider the tool type in TabletSeatV2Interface::toolByHardwareSerial
parent
4e16b10e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/wayland/tablet_v2_interface.cpp
View file @
264bb6c5
...
...
@@ -810,10 +810,10 @@ TabletToolV2Interface *TabletSeatV2Interface::toolByHardwareId(quint64 hardwareI
return
nullptr
;
}
TabletToolV2Interface
*
TabletSeatV2Interface
::
toolByHardwareSerial
(
quint64
hardwareSerial
)
const
TabletToolV2Interface
*
TabletSeatV2Interface
::
toolByHardwareSerial
(
quint64
hardwareSerial
,
TabletToolV2Interface
::
Type
type
)
const
{
for
(
TabletToolV2Interface
*
tool
:
qAsConst
(
d
->
m_tools
))
{
if
(
tool
->
d
->
hardwareSerial
()
==
hardwareSerial
)
if
(
tool
->
d
->
hardwareSerial
()
==
hardwareSerial
&&
tool
->
d
->
m_type
==
type
)
return
tool
;
}
return
nullptr
;
...
...
src/wayland/tablet_v2_interface.h
View file @
264bb6c5
...
...
@@ -260,7 +260,7 @@ public:
TabletToolV2Interface
*
addTool
(
TabletToolV2Interface
::
Type
type
,
quint64
hardwareSerial
,
quint64
hardwareId
,
const
QVector
<
TabletToolV2Interface
::
Capability
>
&
capabilities
);
TabletToolV2Interface
*
toolByHardwareId
(
quint64
hardwareId
)
const
;
TabletToolV2Interface
*
toolByHardwareSerial
(
quint64
hardwareSerial
)
const
;
TabletToolV2Interface
*
toolByHardwareSerial
(
quint64
hardwareSerial
,
TabletToolV2Interface
::
Type
type
)
const
;
TabletPadV2Interface
*
padByName
(
const
QString
&
sysname
)
const
;
void
removeDevice
(
const
QString
&
sysname
);
...
...
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