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
dff485f1
Commit
dff485f1
authored
Sep 30, 2021
by
Rodney Dawes
Browse files
TextInputV2: Add API to set modifiers map on clients
parent
b58cc08a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/wayland/textinput_v2_interface.cpp
View file @
dff485f1
...
...
@@ -301,6 +301,17 @@ void TextInputV2InterfacePrivate::sendLanguage()
}
}
void
TextInputV2InterfacePrivate
::
sendModifiersMap
()
{
if
(
!
surface
)
{
return
;
}
const
QList
<
Resource
*>
textInputs
=
textInputsForClient
(
surface
->
client
());
for
(
auto
resource
:
textInputs
)
{
send_modifiers_map
(
resource
->
handle
,
modifiersMap
);
}
}
TextInputV2InterfacePrivate
::
TextInputV2InterfacePrivate
(
SeatInterface
*
seat
,
TextInputV2Interface
*
_q
)
:
seat
(
seat
)
,
q
(
_q
)
...
...
@@ -489,6 +500,16 @@ void TextInputV2Interface::setLanguage(const QString &languageTag)
d
->
sendLanguage
();
}
void
TextInputV2Interface
::
setModifiersMap
(
const
QByteArray
&
modifiersMap
)
{
if
(
d
->
modifiersMap
==
modifiersMap
)
{
// not changed
return
;
}
d
->
modifiersMap
=
modifiersMap
;
d
->
sendModifiersMap
();
}
QPointer
<
SurfaceInterface
>
TextInputV2Interface
::
surface
()
const
{
return
d
->
surface
;
...
...
src/wayland/textinput_v2_interface.h
View file @
dff485f1
...
...
@@ -211,6 +211,11 @@ public:
*/
void
setLanguage
(
const
QString
&
languageTag
);
/**
* Sets the modifiers map to use when modifiers are included in a key event.
*/
void
setModifiersMap
(
const
QByteArray
&
modifiersMap
);
Q_SIGNALS:
/**
* Requests input panels (virtual keyboard) to show.
...
...
src/wayland/textinput_v2_interface_p.h
View file @
dff485f1
...
...
@@ -46,6 +46,7 @@ public:
void
keysymReleased
(
quint32
keysym
,
quint32
modifiers
);
void
sendInputPanelState
();
void
sendLanguage
();
void
sendModifiersMap
();
QList
<
Resource
*>
textInputsForClient
(
ClientConnection
*
client
)
const
;
static
TextInputV2InterfacePrivate
*
get
(
TextInputV2Interface
*
inputInterface
)
...
...
@@ -65,6 +66,7 @@ public:
bool
inputPanelVisible
=
false
;
QRect
overlappedSurfaceArea
;
QString
language
;
QByteArray
modifiersMap
;
TextInputV2Interface
*
q
;
QSet
<
SurfaceInterface
*>
m_enabledSurfaces
;
...
...
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