summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn@endlessos.org>2023-02-13 10:21:39 -0700
committerSimon McVittie <smcv@collabora.com>2023-02-13 18:24:54 +0000
commitcc122e297235d68301f2c4c466bed997db05937c (patch)
tree1f38fdee7e735c1b5dde7f04359da0e74f98096f
parentbe2de97e862e5ca223da40a895e54e7bf24dbfb9 (diff)
downloadflatpak-cc122e297235d68301f2c4c466bed997db05937c.tar.gz
flatpak-run: Unset GDK_BACKEND
If the `GDK_BACKEND` environment variable is present and it's value does not match the Wayland and X11 socket configuration, then a GTK app will fail to run since it will only consider the display backend from the environment variable. This should probably be extended to cover other display environment variables such as `QT_QPA_PLATFORM` for Qt and `SDL_VIDEODRIVER` for SDL. However, I've only tested this with GTK applications.
-rw-r--r--common/flatpak-run.c1
-rw-r--r--doc/flatpak-run.xml1
2 files changed, 2 insertions, 0 deletions
diff --git a/common/flatpak-run.c b/common/flatpak-run.c
index 3c85f922..9a5195ab 100644
--- a/common/flatpak-run.c
+++ b/common/flatpak-run.c
@@ -1912,6 +1912,7 @@ static const ExportData default_exports[] = {
{"KRB5CCNAME", NULL},
{"XKB_CONFIG_ROOT", NULL},
{"GIO_EXTRA_MODULES", NULL},
+ {"GDK_BACKEND", NULL},
};
static const ExportData no_ld_so_cache_exports[] = {
diff --git a/doc/flatpak-run.xml b/doc/flatpak-run.xml
index 4e37f910..80e1fe03 100644
--- a/doc/flatpak-run.xml
+++ b/doc/flatpak-run.xml
@@ -103,6 +103,7 @@
<member>KRB5CCNAME</member>
<member>XKB_CONFIG_ROOT</member>
<member>GIO_EXTRA_MODULES</member>
+ <member>GDK_BACKEND</member>
</simplelist>
<para>
Also several environment variables with the prefix "GST_" that are used by gstreamer