Repository navigation
fix: restore the XDG portal version check for Linux file dialogs - #54227
Merged
Merged
Conversation
The Chromium 145 roll dropped the patch hunk that called StartPortalAvailabilityTestInBackground(), so the availability flag was never set: IsPortalAvailable() always returned false and logged a warning on every open dialog with a defaultPath, and --xdg-portal-required-version had no effect because Chromium hard-codes a minimum of 3. Remove Electron's private D-Bus probe and instead pass the switch value to SelectFileDialogLinuxPortal through a small setter in the existing dialog patch, and use dbus_xdg::RequestXdgDesktopPortal() for the defaultPath hint log.
deepak1556
approved these changes
Sep 24, 2026
|
Release Notes Persisted
|
Contributor
|
I was unable to backport this PR to "45-x-y" cleanly; |
Contributor
|
I was unable to backport this PR to "43-x-y" cleanly; |
Contributor
|
I was unable to backport this PR to "44-x-y" cleanly; |
Contributor
|
@MarshallOfSound has manually backported this PR to "45-x-y", please check out #54302 |
Contributor
|
@MarshallOfSound has manually backported this PR to "44-x-y", please check out #54303 |
Contributor
|
@MarshallOfSound has manually backported this PR to "43-x-y", please check out #54304 |
MarshallOfSound
added a commit
that referenced
this pull request
Sep 24, 2026
…x-y) (#54304) fix: restore the XDG portal version check for Linux file dialogs (#54227) The Chromium 145 roll dropped the patch hunk that called StartPortalAvailabilityTestInBackground(), so the availability flag was never set: IsPortalAvailable() always returned false and logged a warning on every open dialog with a defaultPath, and --xdg-portal-required-version had no effect because Chromium hard-codes a minimum of 3. Remove Electron's private D-Bus probe and instead pass the switch value to SelectFileDialogLinuxPortal through a small setter in the existing dialog patch, and use dbus_xdg::RequestXdgDesktopPortal() for the defaultPath hint log. (cherry picked from commit 9bfd737)
MarshallOfSound
added a commit
that referenced
this pull request
Sep 24, 2026
…x-y) (#54303) fix: restore the XDG portal version check for Linux file dialogs (#54227) The Chromium 145 roll dropped the patch hunk that called StartPortalAvailabilityTestInBackground(), so the availability flag was never set: IsPortalAvailable() always returned false and logged a warning on every open dialog with a defaultPath, and --xdg-portal-required-version had no effect because Chromium hard-codes a minimum of 3. Remove Electron's private D-Bus probe and instead pass the switch value to SelectFileDialogLinuxPortal through a small setter in the existing dialog patch, and use dbus_xdg::RequestXdgDesktopPortal() for the defaultPath hint log. (cherry picked from commit 9bfd737)
MarshallOfSound
added a commit
that referenced
this pull request
Sep 24, 2026
…x-y) (#54302) fix: restore the XDG portal version check for Linux file dialogs (#54227) The Chromium 145 roll dropped the patch hunk that called StartPortalAvailabilityTestInBackground(), so the availability flag was never set: IsPortalAvailable() always returned false and logged a warning on every open dialog with a defaultPath, and --xdg-portal-required-version had no effect because Chromium hard-codes a minimum of 3. Remove Electron's private D-Bus probe and instead pass the switch value to SelectFileDialogLinuxPortal through a small setter in the existing dialog patch, and use dbus_xdg::RequestXdgDesktopPortal() for the defaultPath hint log. (cherry picked from commit 9bfd737)
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
Before: since the Chromium 145 roll (#49175) nothing called
StartPortalAvailabilityTestInBackground(), so on LinuxIsPortalAvailable()always returned false and logged "Portal availability checked before test was complete" on every open dialog with adefaultPath, and--xdg-portal-required-versionhad no effect because Chromium hard-codes a minimum portal version of 3.After: the switch works again and the spurious warning is gone; the
defaultPathhint is only logged when the portal in use is older than v4.shell/browser/ui/file_dialog_linux_portal.cc(Electron's private D-Bus probe) and its declarations.SelectFileDialogLinuxPortal::SetRequiredPortalVersion()to the existing shell_dialogs patch and feed it from the switch.dbus_xdg::RequestXdgDesktopPortal()for the version used in thedefaultPathlog.Fixes #49218
Checklist
Release Notes
Notes: Fixed
--xdg-portal-required-versionhaving no effect and a spurious portal warning being logged for file dialogs on Linux.