Bug 1516290 - Disable xdg mime portal in non-flatpack environments by default, r=emilio,stransky

The mime portal breaks checking and setting the default browser.
thus disable it by default, just like D135120 did for printing.

Differential Revision: https://phabricator.services.mozilla.com/D136076
This commit is contained in:
Robert Mader 2022-01-23 18:09:21 +00:00
Родитель 67c4eb5567
Коммит f2c99134d3
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -12635,7 +12635,7 @@
# Whether to use gtk portal for the mime handler.
# - 0: never
# - 1: always
# - 2: auto (true for flatpak or GTK_USE_PORTAL=1, false otherwise)
# - 2: auto (for now only true for flatpak, see bug 1516290)
- name: widget.use-xdg-desktop-portal.mime-handler
type: int32_t
value: 2

Просмотреть файл

@ -113,6 +113,8 @@ bool ShouldUsePortal(PortalKind aPortalKind) {
case PortalKind::FilePicker:
return StaticPrefs::widget_use_xdg_desktop_portal_file_picker();
case PortalKind::MimeHandler:
// Mime portal breaks default browser handling, see bug 1516290.
autoBehavior = IsRunningUnderFlatpak();
return StaticPrefs::widget_use_xdg_desktop_portal_mime_handler();
case PortalKind::Print:
// Print portal still needs more work, so auto behavior is just when