-
Notifications
You must be signed in to change notification settings - Fork 16.5k
feat: support global shortcuts via GlobalShortcutsPortal
feature with ozone/wayland
#45297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
96a16ad
to
a0e6bfe
Compare
a0e6bfe
to
6f7a280
Compare
This backports a patch from Chromium, which fixes systemd unit activation. That is, a globalShortcuts feature that Chromium has needs to create a systemd unit and rename it properly. Portal's global shortcuts uses that name afterwards to map the app with the shortcuts bound. However, there might be a race between Chromium binding shortcuts and renaming the unit. This is a first step to add Portal's globalShortcuts to Electron. Co-authored-by: Maksim Sisov <[email protected]>
Chromium has a new feature called GlobalShortcutsPortal. It allows clients to use Portal's globalShortcuts to register and listen to shortcuts. This patches adds necessary bits, which allows Electron to use that feature. In order to make it work, one has to add --enable-features=GlobalShortcutsPortal Test: tested manually with a sample app. Co-authored-by: Maksim Sisov <[email protected]>
869cf84
to
aaba99d
Compare
Electron supports Portal's globalShortcuts API now via Chromium, and Electron apps can use that in a Wayland session. Update the docs with the required feature flag that must be passed to be able to use that implementation. Co-authored-by: Maksim Sisov <[email protected]>
aaba99d
to
ea9ced2
Compare
GlobalShortcutsPortal
feature with ozone/wayland
hey @Obsessee i'm fixing it up now and will merge after this CI run hopefully passes. |
Release Notes Persisted
|
Something is wrong with our CI, this PR went green but it shouldn't've been able to build...? I don't know how CI went green but landing this causes 35-x-y (and today's release of 35.0.0-beta.11) to fail to compile. This change is already present in 134.0.6998.23 and doesn't need to be patched in. Doesn't look like this is some kind of two-PRs-in-flight-at-the-same-time issue either. @electron/wg-infra can someone PTAL? I've put up a PR to remove the patch @ #45838 |
Backport of #45171
See that PR for details.
Notes: support Portal's globalShortcuts. Electron must be run with --enable-features=GlobalShortcutsPortal in order to have the feature working.