[wayland] Avoid compare to unintialised value in keyboard repeat
ClosedPublic

Authored by davidedmundson on Sep 6 2019, 9:52 AM.

Details

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.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Sep 6 2019, 9:52 AM
Restricted Application added a project: KWin. · View Herald TranscriptSep 6 2019, 9:52 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Sep 6 2019, 9:52 AM
zzag accepted this revision.Sep 6 2019, 9:56 AM
This revision is now accepted and ready to land.Sep 6 2019, 9:56 AM
This revision was automatically updated to reflect the committed changes.