Skip to content

Commit

Permalink
Bug 1516290 - Disable xdg mime portal in non-flatpack environments by…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
rmader committed Jan 23, 2022
1 parent 06bffa8 commit 5786adf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/libpref/init/StaticPrefList.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions widget/gtk/WidgetUtilsGtk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5786adf

Please sign in to comment.