gecko-dev/toolkit/system
Michael Weghorn 1b52f1f63a Bug 1646499 - Fix GTK_USE_PORTAL env variable evaluation. r=stransky
While the comment for 'GetFlatpakPortalEnv' said
"We use the same code as gtk_should_use_portal() to detect
if we're in flatpak env", this was not actually true, since the
code only checked whether the environment variable 'GTK_USE_PORTAL'
was set at all, ignoring its value, while the gtk implementation
checks that it is set and that the first character is '1'
(which was already true in the gtk as of the commit that the
comment refers to, [1]).

Adapt it to check for the actual value here, according to what
is also done at [2], so that setting 'GTK_USE_PORTAL=0' or
'GTK_USE_PORTAL=1' in the environment works as expected.

I ran into this while looking at why bug 1517074 still occured
with the native file chooser presumably having been disabled by
starting Firefox using

    GTK_USE_PORTAL=0 firefox

with gtk 3.24.20 that does not yet have the fix for gtk issue [3].

[1] e0ce028c88/gtk/gtkprivate.c (L272)
[2] https://searchfox.org/mozilla-central/rev/37932bfc600f97ec923464086dc12cdaa72aefde/widget/gtk/nsFilePicker.cpp#608
[3] https://gitlab.gnome.org/GNOME/gtk/-/issues/1820

Differential Revision: https://phabricator.services.mozilla.com/D80073
2020-06-24 08:06:00 +00:00
..
androidproxy
gnome Bug 1646499 - Fix GTK_USE_PORTAL env variable evaluation. r=stransky 2020-06-24 08:06:00 +00:00
osxproxy Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin 2020-04-24 13:31:14 +00:00
unixproxy Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin 2020-05-27 18:11:12 +00:00
windowsDHCPClient
windowsproxy Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin 2020-04-24 13:31:14 +00:00