Diffusion KWin 04845b60074b

[wayland] Avoid compare to unintialised value in keyboard repeat

Authored by davidedmundson on Sep 23 2019, 8:13 PM.

Description

[wayland] Avoid compare to unintialised value in keyboard repeat

Summary:
If we get a key event for which

if (m_xkb->shouldKeyRepeat(key) &&
waylandServer()->seat()->keyRepeatDelay() != 0) fails

m_key will be unitialised and on release we have a compare against
unitialised memory.

Won't do any harm, it'll just stop a timer that isn't running, but
valgrind complains.

0 is the value QKeyEvent uses when nativeScanCode is unknown so a safe
initial values.

Reviewers: KWin, zzag

Reviewed By: KWin, zzag

Subscribers: kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D23748

Details

Committed
davidedmundsonSep 23 2019, 8:13 PM
Reviewer
KWin
Differential Revision
D23748: [wayland] Avoid compare to unintialised value in keyboard repeat
Parents
R108:a209ee786548: Don't notify ksplash in our wayland session
Branches
Unknown
Tags
Unknown