fix: use GTK UI theme for Linux message boxes#52238
Merged
VerteDinde merged 1 commit intoJul 21, 2026
Merged
Conversation
Look up the GTK-specific Linux UI theme before accessing the GtkUiPlatform instead of casting the active LinuxUi singleton. This keeps GTK message boxes on the GTK platform path even when the active Linux UI implementation is not GTK. Assisted-By: OpenAI Codex Signed-off-by: Scarab Systems <[email protected]>
Contributor
Author
|
Thanks @0x9fff00 for checking this downstream and linking the Arch package patch. That external confirmation is helpful. I’ll leave this open for Electron maintainer direction, and I’m happy to adjust the patch if maintainers want a different shape. |
mitchchn
approved these changes
Jul 20, 2026
VerteDinde
approved these changes
Jul 21, 2026
VerteDinde
enabled auto-merge (squash)
July 21, 2026 01:02
|
Congrats on merging your first pull request! 🎉🎉🎉 |
|
Release Notes Persisted
|
Contributor
|
I have automatically backported this PR to "42-x-y", please check out #52408 |
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #52409 |
Contributor
|
I have automatically backported this PR to "43-x-y", please check out #52410 |
Contributor
Author
Woohoo! Thank you so much! 🙏 Scarab |
scarab-systems
deleted the
scarab-systems/electron-51988-gtk-messagebox-platform-v2
branch
July 21, 2026 01:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Fixes #51988.
Linux message boxes need the GTK
GtkUiPlatform, but this helper was castingthe active
LinuxUisingleton togtk::GtkUi. When another Linux UIimplementation is active, that can use the wrong object for the GTK message box
path.
This change requests the GTK Linux UI theme directly with
ui::GetLinuxUiTheme(ui::SystemTheme::kGtk)before retrieving its platform, andchecks both the GTK UI and platform pointers before use.
Validation performed:
yarn lint:cpp --only -- shell/browser/ui/message_box_gtk.ccthird_party/ninja/ninja -C out/LinuxTesting obj/electron/electron_lib/message_box_gtk.oFor the object rebuild, the prior
message_box_gtk.oandmessage_box_gtk.dwooutputs were removed first so Ninja rebuilt the changed C++ file.
No tests or documentation were changed. This patch is limited to the internal
Linux GTK message box platform lookup and does not add or change public API
behavior.
Checklist
Release Notes
Notes: Fixed a crash when showing Linux message boxes while another Linux UI implementation was active.