mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
* feat: forward activation token from libnotify notification clicks When a notification action is clicked on Linux, retrieve the activation token from libnotify (if available) via dlsym and set it using `base::nix::SetActivationToken()`. This enables proper window focus handling under Wayland, where the compositor requires a valid activation token to grant focus to the application. The `notify_notification_get_activation_token` symbol is resolved at runtime to maintain compatibility with older libnotify versions that do not expose this API. Co-authored-by: Bohdan Tkachenko <bohdan@tkachenko.dev> * refactor: simplify libnotify soname loading and activation token lookup Replace the chained Load() calls with a loop over a constexpr array of sonames, and inline the lazy EnsureActivationTokenFunc() into Initialize() since it is only called once and the library handle is already known at that point. Co-authored-by: Bohdan Tkachenko <bohdan@tkachenko.dev> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Bohdan Tkachenko <bohdan@tkachenko.dev>