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
0c3c7142
Commit
0c3c7142
authored
Feb 19, 2016
by
Martin Flöser
Browse files
[server] Only send modifiers to client if they actually changed
parent
565c832d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/wayland/seat_interface.cpp
View file @
0c3c7142
...
...
@@ -745,12 +745,21 @@ void SeatInterface::setKeymap(int fd, quint32 size)
void
SeatInterface
::
updateKeyboardModifiers
(
quint32
depressed
,
quint32
latched
,
quint32
locked
,
quint32
group
)
{
Q_D
();
bool
changed
=
false
;
#define UPDATE( value ) \
if (d->keys.modifiers.value != value) { \
d->keys.modifiers.value = value; \
changed = true; \
}
UPDATE
(
depressed
)
UPDATE
(
latched
)
UPDATE
(
locked
)
UPDATE
(
group
)
if
(
!
changed
)
{
return
;
}
const
quint32
serial
=
d
->
display
->
nextSerial
();
d
->
keys
.
modifiers
.
serial
=
serial
;
d
->
keys
.
modifiers
.
depressed
=
depressed
;
d
->
keys
.
modifiers
.
latched
=
latched
;
d
->
keys
.
modifiers
.
locked
=
locked
;
d
->
keys
.
modifiers
.
group
=
group
;
if
(
d
->
keys
.
focus
.
keyboard
&&
d
->
keys
.
focus
.
surface
)
{
d
->
keys
.
focus
.
keyboard
->
updateModifiers
(
depressed
,
latched
,
locked
,
group
,
serial
);
}
...
...
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