Skip to content
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

feat: support global shortcuts via GlobalShortcutsPortal feature with ozone/wayland #45297

Open
wants to merge 3 commits into
base: 35-x-y
Choose a base branch
from

Conversation

trop[bot]
Copy link
Contributor

@trop trop bot commented Jan 22, 2025

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.

trop bot and others added 3 commits January 22, 2025 10:59
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 <msisov@igalia.com>
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 <msisov@igalia.com>
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 <msisov@igalia.com>
@trop trop bot requested a review from a team as a code owner January 22, 2025 11:00
@trop trop bot requested a review from a team January 22, 2025 11:00
@trop trop bot added 35-x-y backport This is a backport PR backport/requested 🗳 semver/minor backwards-compatible functionality labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
35-x-y backport/approved ✅ backport This is a backport PR semver/minor backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants