Fix keyboard layout change notifications

Authored by fvogt on Oct 26 2018, 8:01 AM.

Description

Fix keyboard layout change notifications

Summary:
This rework fixes several issues:

  • Qt wasn't informed about XCB_MAPPING_NOTIFY anymore
  • With XKB enabled in Qt, X won't send XCB_MAPPING_NOTIFY anymore. So listen for XKB events as well.
  • Install the event filter before fetching the keysym mapping to close a race window
  • Use the old mapping for ungrabbing

BUG: 350816
BUG: 269403

Test Plan:
Ctrl-Alt-Y global shortcut works even when doing
"setxkbmap us; kglobalaccel5 & sleep 1; setxkbmap de;" while it did not
before. On some systems, this race happened on every login, now it works
reliably.

Reviewers: Frameworks, Plasma, romangg

Reviewed By: Plasma, romangg

Subscribers: romangg, ngraham, anthonyfieroni, kde-frameworks-devel

Tags: Frameworks

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

Details

Committed
fvogtNov 3 2018, 12:14 PM
Reviewer
Plasma
Differential Revision
D16434: Fix keyboard layout change notifications
Parents
R268:24647fd89fa1: GIT_SILENT Upgrade ECM and KF5 version requirements for 5.52.0 release.
Branches
Unknown
Tags
Unknown