mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
fix: Use XDG_ACTIVATION_TOKEN in wayland when launched by other app (#43481)
When an electron app is launched by another app ensure that the XDG_ACTIVATION_TOKEN env var is read and used for activation using xdg_activation_v1 protocol.
This commit is contained in:
@@ -406,6 +406,11 @@ std::optional<int> ElectronMainDelegate::PreBrowserMain() {
|
||||
content::InitializeMojoCore();
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
RegisterAtomCrApp();
|
||||
#endif
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
// Set the global activation token sent as an environment variable.
|
||||
auto env = base::Environment::Create();
|
||||
base::nix::ExtractXdgActivationTokenFromEnv(*env);
|
||||
#endif
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user