Repository navigation
fix: use app name as a part of tray id on Linux - #48675
Conversation
|
💖 Thanks for opening this pull request! 💖 Semantic PR titlesWe use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Commit signingThis repo enforces commit signatures for all incoming PRs. PR tipsThings that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
|
@Damglador thanks for the PR! Some background context for other reviewers: the approach PR'ed here is what Electron used to do in 2016, added by @zcbenz by #6145. That code was migrated to a Chromium patch in 2018 by #15536, and that patch was removed in 2019 by #16334 because Jeremy upstreamed the patch at https://chromium-review.googlesource.com/c/chromium/src/+/1315840. Sadly, that feature was lost as a side-effect of upstream migrating from libappindicator to DBus StatusNotifier, specifically in 2019 by this commit. tldr: we used to do this, then upstreamed it, and then the upstream change got lost in a refactor. IMO we should accept this as a patch to fix existing Electron releases + try to upstream the patch. Chromium has accepted this feature before and probably would do so again? |
ckerr
left a comment
There was a problem hiding this comment.
I had a handful of nitpicks, but the idea LGTM. I'd be happy to approve once the nitpicks get resolved, and thanks for submitting this PR 👍
The .patch file needs a nudge to make the linter happy |
There was a problem hiding this comment.
The linter still wants another patch change 🤖
2025-10-28T13:07:41.8495148Z ======================================================================
2025-10-28T13:07:41.8495614Z There were changes to the patches when applying.
2025-10-28T13:07:41.8496107Z Check the CI artifacts for a patch you can apply to fix it.
2025-10-28T13:07:41.8496548Z ======================================================================
2025-10-28T13:07:41.8496755Z
2025-10-28T13:07:41.8502788Z From d83db6727edcbf14a29692f1351453eda78d79f7 Mon Sep 17 00:00:00 2001
2025-10-28T13:07:41.8503292Z From: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2025-10-28T13:07:41.8503659Z Date: Tue, 28 Oct 2025 13:07:37 +0000
2025-10-28T13:07:41.8503933Z Subject: chore: update patches
2025-10-28T13:07:41.8504110Z
2025-10-28T13:07:41.8504117Z
2025-10-28T13:07:41.8504626Z diff --git a/patches/chromium/fix_linux_tray_id.patch b/patches/chromium/fix_linux_tray_id.patch
2025-10-28T13:07:41.8505332Z index 160b01d8ac87e7a2774bf1d39e32556bd0fe8130..4a91a36265b244d495988310d2f34b496ccf0086 100644
2025-10-28T13:07:41.8505858Z --- a/patches/chromium/fix_linux_tray_id.patch
2025-10-28T13:07:41.8506408Z +++ b/patches/chromium/fix_linux_tray_id.patch
2025-10-28T13:07:41.8506892Z @@ -13,7 +13,7 @@ https://github.com/electron/electron/pull/48675#issuecomment-3452781711
2025-10-28T13:07:41.8507305Z for more info.
2025-10-28T13:07:41.8507512Z
2025-10-28T13:07:41.8508082Z diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
2025-10-28T13:07:41.8508812Z -index e268573d360b1..3034ad52ab2f9 100644
2025-10-28T13:07:41.8509311Z +index e268573d360b1744c739bc516e81261c3869cd23..3034ad52ab2f90e12d134eb0190e71dbd60fc105 100644
2025-10-28T13:07:41.8509903Z --- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
2025-10-28T13:07:41.8510367Z +++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
2025-10-28T13:07:41.8510746Z @@ -131,8 +131,8 @@ int NextServiceId() {
2025-10-28T13:07:41.8511071Z @@ -49,7 +49,7 @@ index e268573d360b1..3034ad52ab2f9 100644
2025-10-28T13:07:41.8511422Z kPropertyOverlayIconName, "", false);
2025-10-28T13:07:41.8511894Z properties_->SetProperty<"s">(kInterfaceStatusNotifierItem, kPropertyStatus,
2025-10-28T13:07:41.8512673Z diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
2025-10-28T13:07:41.8513320Z -index 78c0ddf50ae6c..984673954bb7f 100644
2025-10-28T13:07:41.8513833Z +index 78c0ddf50ae6cafed1badaeb951b1dab3110f095..984673954bb7f0b4c902677c70ab88c602201060 100644
2025-10-28T13:07:41.8514440Z --- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
2025-10-28T13:07:41.8514902Z +++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
2025-10-28T13:07:41.8515391Z @@ -35,7 +35,7 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux,
2025-10-28T13:07:41.8515798Z --
2025-10-28T13:07:41.8515977Z 2.50.1
2025-10-28T13:07:41.8516081Z
2025-10-28T13:07:41.8546975Z ##[error]Process completed with exit code 1.
2025-10-28T13:07:41.8588972Z ##[group]Run while [ -f /var/.ssh-lock ]
ckerr
left a comment
There was a problem hiding this comment.
Another clang warning in CI, looks like the initialization of app_name_ needs to be moved further down to resolve a -Wreorder-ctor warning
2025-10-29T14:59:28.7448234Z ##[error]../../chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc:226:7: error: field 'app_name_' will be initialized after field 'bus_' [-Werror,-Wreorder-ctor]
2025-10-29T14:59:28.7449081Z 226 | : app_name_(app_name),
2025-10-29T14:59:28.7449342Z | ^~~~~~~~~~~~~~~~~~~
2025-10-29T14:59:28.7452685Z | bus_(dbus_thread_linux::GetSharedSessionBus())
2025-10-29T14:59:28.7453056Z 227 | bus_(dbus_thread_linux::GetSharedSessionBus()),
2025-10-29T14:59:28.7453379Z | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-10-29T14:59:28.7453707Z | should_write_icon_to_file_(ShouldWriteIconToFile())
2025-10-29T14:59:28.7454073Z 228 | should_write_icon_to_file_(ShouldWriteIconToFile()),
2025-10-29T14:59:28.7454400Z | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-10-29T14:59:28.7454795Z 229 | icon_task_runner_(base::ThreadPool::CreateSequencedTaskRunner(
2025-10-29T14:59:28.7455384Z | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-10-29T14:59:28.7456152Z | app_name_(app_name)
2025-10-29T14:59:28.7456796Z 230 | {base::MayBlock(), base::TaskPriority::USER_VISIBLE,
2025-10-29T14:59:28.7457598Z | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-10-29T14:59:28.7458191Z 231 | base::TaskShutdownBehavior::BLOCK_SHUTDOWN})) {
2025-10-29T14:59:28.7458666Z | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-10-29T14:59:28.7459043Z 1 error generated.
2025-10-29T14:59:28.7459218Z
2025-10-29T14:59:28.7459238Z
|
I have a couple of questions. I've read the contribution guide before doing the PR and it says that
So I've signed the first commit, but I forgot to do that for the following commits. Do all the commits have to be signed for the PR to be accepted? And is there anything else that has to be done? |
|
@Damglador every commit needs to be signed, yes. You can just squash them into one commit and sign that if it's easier. |
|
Re-signed all commits and rebased to upsteam/main |
|
@Damglador thanks for the PR and for the updates! |
|
Congrats on merging your first pull request! 🎉🎉🎉 |
|
Release Notes Persisted
|
* fix: use browser name as tray id * fix: remove unnecessary .c_str() * fix: use string_view instead of string& * fix: move app_name_ to the bottom of private: section https://google.github.io/styleguide/cppguide.html#Declaration_Order * fix: use base's string utils to join strings * docs: note when to remove the patch * fix: update patch * fix: make linter happy * fix: move app_name_ to the bottom of private: section
* fix: use browser name as tray id * fix: remove unnecessary .c_str() * fix: use string_view instead of string& * fix: move app_name_ to the bottom of private: section https://google.github.io/styleguide/cppguide.html#Declaration_Order * fix: use base's string utils to join strings * docs: note when to remove the patch * fix: update patch * fix: make linter happy * fix: move app_name_ to the bottom of private: section
* fix: use browser name as tray id * fix: remove unnecessary .c_str() * fix: use string_view instead of string& * fix: move app_name_ to the bottom of private: section https://google.github.io/styleguide/cppguide.html#Declaration_Order * fix: use base's string utils to join strings * docs: note when to remove the patch * fix: update patch * fix: make linter happy * fix: move app_name_ to the bottom of private: section
* chore: bump chromium in DEPS to 144.0.7543.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * Pass PipScreenCaptureCoordinatorProxy to ScreenCaptureKitDeviceMac https://chromium-review.googlesource.com/c/chromium/src/+/7157590 Co-authored-by: John Kleinschmidt <[email protected]> * chore: update patches Co-authored-by: John Kleinschmidt <[email protected]> * chore: update filenames.libcxx.gni Co-authored-by: John Kleinschmidt <[email protected]> * 7142359: Spanification of process_singleton_posix.cc https: //chromium-review.googlesource.com/c/chromium/src/+/7142359 Co-Authored-By: Charles Kerr <[email protected]> Co-authored-by: John Kleinschmidt <[email protected]> * Move logging::LoggingSettings to base/logging/logging_settings.h https://chromium-review.googlesource.com/c/chromium/src/+/7173024 Co-authored-by: John Kleinschmidt <[email protected]> * chore: bump chromium in DEPS to 144.0.7545.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * 7159368: update PluginService API for sync GetPlugins Upstream removed async PluginService APIs: - GetPluginsAsync() removed, use synchronous GetPlugins() - RegisterInternalPlugin() now takes single argument (remove add_at_beginning) - RefreshPlugins() removed entirely Updated ElectronPluginInfoHostImpl to use synchronous plugin loading and simplified ElectronBrowserMainParts internal plugin registration. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7159368 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7159328 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7159056 (cherry picked from commit 88cdf50) Co-authored-by: Samuel Attard <[email protected]> * 7159184: add missing base/files/file_path.h include Add explicit include for base/files/file_path.h in electron_browser_context.h. After removal of superfluous Mojo includes from content headers, base::FilePath is no longer transitively included via content/public/browser/browser_context.h. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7159184 (cherry picked from commit 6ca8ea0) Co-authored-by: Samuel Attard <[email protected]> * 7126479: add ShouldForceRefreshTextCheckService parameter to SpellCheckClient Upstream added a force-refresh parameter to WebTextCheckClient::RequestCheckingOfText to bypass spell check cache. Add the new ShouldForceRefreshTextCheckService parameter to SpellCheckClient's override (currently unused in Electron). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7126479 (cherry picked from commit 879c040) Co-authored-by: Samuel Attard <[email protected]> * 7083663: remove fingerprinting_protection_ruleset_service override Upstream deleted external references to Fingerprinting Protection Filter (FPF) component. Remove the fingerprinting_protection_ruleset_service() override from BrowserProcessImpl as the method no longer exists in the base class. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7083663 (cherry picked from commit 8350d15) Co-authored-by: Samuel Attard <[email protected]> * 7155287: implement WebContentsView::GetSize and Resize Upstream delegated WebContents::GetSize() and Resize() to WebContentsView, making them pure virtual. Add const qualifier to GetSize() and implement the Resize() override in OffScreenWebContentsView (no-op for offscreen). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7155287 (cherry picked from commit 084eaa5) Co-authored-by: Samuel Attard <[email protected]> * 7184238: add OnUnconfirmedTapConvertedToTap override Upstream added OnUnconfirmedTapConvertedToTap as a pure virtual method to RenderWidgetHostViewBase to inform root view when child frame converts an unconfirmed tap. Add empty override for offscreen rendering. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7184238 (cherry picked from commit ef03400) Co-authored-by: Samuel Attard <[email protected]> * 7143586: add widget parameter to OnCommandsChanged GlobalAcceleratorListener::OnCommandsChanged gained a gfx::AcceleratedWidget parameter for window association in the GlobalShortcutListenerLinux implementation. Pass gfx::kNullAcceleratedWidget for Electron's usage. Ref: : Pass parent handle to GlobalAcceleratorListenerLinux::BindShortcuts | https://chromium-review.googlesource.com/c/chromium/src/+/7143586 (cherry picked from commit 38306e2) Co-Authored-By: Samuel Attard <[email protected]> Co-authored-by: Samuel Attard <[email protected]> * chore: update patches Co-Authored-By: Samuel Attard <[email protected]> Co-authored-by: John Kleinschmidt <[email protected]> * chore: bump chromium in DEPS to 144.0.7547.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: John Kleinschmidt <[email protected]> * 7189232: Add support for UnownedUserData in GlobalFeatures https: //chromium-review.googlesource.com/c/chromium/src/+/7189232 Co-authored-by: John Kleinschmidt <[email protected]> * Refactor: Use std::u16string for extension load error messages https://chromium-review.googlesource.com/c/chromium/src/+/7185844 Co-authored-by: John Kleinschmidt <[email protected]> * fixup Add support for UnownedUserData in GlobalFeatures Co-authored-by: John Kleinschmidt <[email protected]> * 7165650: Remove ResourceContext https://chromium-review.googlesource.com/c/chromium/src/+/7165650 Co-authored-by: John Kleinschmidt <[email protected]> * fixup BUILD.gn for lint Co-authored-by: John Kleinschmidt <[email protected]> * 7202164: Reland "Reland "Remove GenericScopedHandle:IsValid"" https://chromium-review.googlesource.com/c/chromium/src/+/7202164 Co-authored-by: John Kleinschmidt <[email protected]> * advance deprecation of v8::ReturnValue<void>::Set(Local<S>). 7168624: [runtime][api] Relax requirements for setter/definer/deleter callbacks | https://chromium-review.googlesource.com/c/v8/v8/+/7168624 Co-authored-by: John Kleinschmidt <[email protected]> * fixup advance deprecation of v8::ReturnValue<void>::Set(Local<S>) Co-authored-by: John Kleinschmidt <[email protected]> * chore: skip setting LPAC ACLs Co-authored-by: John Kleinschmidt <[email protected]> * Revert "chore: skip setting LPAC ACLs" This reverts commit e187aec. Co-authored-by: John Kleinschmidt <[email protected]> * chore: revert Convert to UNSAFE_TODO in sandbox revert https://chromium-review.googlesource.com/c/chromium/src/+/7131661 to see if it fixes the Windows sandbox issue. Co-authored-by: John Kleinschmidt <[email protected]> * Revert "chore: revert Convert to UNSAFE_TODO in sandbox" This reverts commit 57afbfe. Co-authored-by: John Kleinschmidt <[email protected]> * chore: Revert "Enable network sandbox by default on Windows" see if this fixes the Windows sandbox issue Co-authored-by: John Kleinschmidt <[email protected]> * Enable network sandbox by default on Windows https://chromium-review.googlesource.com/c/chromium/src/+/7204292 Co-authored-by: John Kleinschmidt <[email protected]> * Revert "chore: Revert "Enable network sandbox by default on Windows"" This reverts commit 530ab6a. Co-authored-by: John Kleinschmidt <[email protected]> * fixup! Enable network sandbox by default on Windows | https://chromium-review.googlesource.com/c/chromium/src/+/7204292 Co-authored-by: Keeley Hammond <[email protected]> * fixup!: Correct flag name, add kLocalNetworkAccessChecks to all platforms Co-authored-by: Keeley Hammond <[email protected]> * chore: remove patch that hasn't been backported See #48675 --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <[email protected]> Co-authored-by: Samuel Attard <[email protected]> Co-authored-by: John Kleinschmidt <[email protected]> Co-authored-by: Keeley Hammond <[email protected]> Co-authored-by: Niklas Wenzel <[email protected]>
Description of Change
Sets
org.freedesktop.StatusNotifierItem.Idof tray icons tothe name of the app + _status_icon_ + counterinstead ofchrome_status_icon_ + counter.Closes #40936
Relevant issue on KDE Plasma https://bugs.kde.org/show_bug.cgi?id=470840
Checklist
npm testpassesRelease Notes
Notes: Fixed ID of tray icons on Linux