Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • K KWindowSystem
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Frameworks
  • KWindowSystem
  • Merge requests
  • !45

Avoid XKeycodeToKeysym in KKeyServer::initializeMods

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Fabian Vogt requested to merge work/fvogt/bug426684 into master Jan 02, 2022
  • Overview 4
  • Commits 1
  • Pipelines 6
  • Changes 1

Xlib functions which work with keyboard mappings have a (Display) internal cache, which needs to be refreshed on mapping changes by calling X(kb)RefreshKeyboardMapping on change notify events.

After Qt switched to XCB, that is no longer happening, and it's also not possible to get to the XEvent needed for triggering the refresh. Switch over to using the XCB equivalent and just load the symbols on every invocation.

BUG: 426684

CC @butirsky

Some other KKeyServer functions are similarly affected. Doing the same change there would however have a noticable effect on performance, as it would have to transfer the entire mapping on each call. The only way to avoid that is by maintaining a cache ourselves, and calling xcb_refresh_keyboard_mapping in a native event filter in a global object, which is annoying to deal with. That's something for a future MR.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: work/fvogt/bug426684