Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • W wine
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • Alexandros Frantzis
  • wine
  • Merge requests
  • !45

Draft: Sync keyboard depressed modifier keys properly

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Leandro Ribeiro requested to merge leandrohrb/wine:fix-keyboard-alt-tab into wayland Nov 24, 2022
  • Overview 5
  • Commits 202
  • Changes 59

When we Alt-tab to switch to another window, Wine Wayland receives the Alt key press from the compositor. When we switch back to the game window (using Alt-tab again), the game does not receive the Alt key press, because the focus was not the game window.

So on Wine we end up never receiving the event that says that the Alt key was release, and we get stuck as if Alt was pressed. Fortunately, when we get the focus back to the game window, the compositor sends us an event with the keyboard modifiers that are active.

So when we receive this keyboard modifiers event, we should compare the state of Alt, Shift and Control from the Wayland perspective with Wine's internal perspective. If they differ, we must update Wine's internal state, following what the compositor has told us.

We are already doing that for lock modifiers (capslock, numlock), but we are missing the depressed modifiers (alt, shift, ctrl).

Edited Nov 30, 2022 by Leandro Ribeiro
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-keyboard-alt-tab