Better handle cases when the xkb keymap fails to be created
ClosedPublic

Authored by graesslin on Jun 18 2017, 7:04 PM.

Details

Summary

If the keymap cannot be created a few pointers in Xkb are null.
We should make sure to not call any xkbcommon functions on those
null pointers and instead use proper fallbacks.

This change introduces fixes for a few usages, but it's not unlikely
that there are more cases.

BUG: 381210
FIXED-IN: 5.10.3

Test Plan

Autotest added for the condition of the bug, which does
not crash any more. Just starting the test found a few more crash
cases.

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.
graesslin created this revision.Jun 18 2017, 7:04 PM
Restricted Application added a project: KWin. · View Herald TranscriptJun 18 2017, 7:04 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
mart accepted this revision.Jun 19 2017, 6:24 PM
This revision is now accepted and ready to land.Jun 19 2017, 6:24 PM
This revision was automatically updated to reflect the committed changes.