-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
input: performable bindings aren't part of the reverse mapping (#5421)
Fixes #4522 This is a bit of a hammer-meets-nail solution, but it's a simple solution to the problem. The reverse mapping is used to find the binding that an action is bound to, and it's used by apprt's to populate the accelerator label in the UI. The problem is that accelerators in GTK are handled early in the event handling process and its difficult to get that event mapping to a specific surface. Therefore, the "performable" prefix was not working. On macOS, this issue didn't exist because there exists an OS mechanism to install an event handler earlier than the menu system. This commit changes the reverse mapping to only include bindings that are not performable. This way, the keybind always reaches the surface and can be handled by `Surface.keyCallback` which processes `performable`. The caveat is that performable bindings will not show up in the UI for menu items. This is documented in this commit now. They still work, its just a UI issue.
- Loading branch information
Showing
2 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters