[gnome-settings-daemon] plugins: Unset GDK_BACKEND envvar if a specific backend is needed
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] plugins: Unset GDK_BACKEND envvar if a specific backend is needed
- Date: Wed, 13 Jul 2022 14:54:48 +0000 (UTC)
commit c960ce46125f819379fe659883dafa0087d24fe3
Author: Michel Dänzer <mdaenzer redhat com>
Date: Wed Jul 6 18:31:37 2022 +0200
plugins: Unset GDK_BACKEND envvar if a specific backend is needed
This currently affects only the xsettings plugin, which needs GDK to use
the x11 backend. It already calls gdk_set_allowed_backends ("x11") for
this purpose; however, if GDK_BACKEND=wayland (or any other non-x11
backend possibly) happened to be in the environment, GDK would fail to
initialize at all. This would prevent the xsettings plugin from starting
up.
Big thanks to Olivier Fourdan for figuring this out!
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2022283
Bug: https://bugs.debian.org/1008992
plugins/common/daemon-skeleton-gtk.h | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/plugins/common/daemon-skeleton-gtk.h b/plugins/common/daemon-skeleton-gtk.h
index 596281df..4e67706e 100644
--- a/plugins/common/daemon-skeleton-gtk.h
+++ b/plugins/common/daemon-skeleton-gtk.h
@@ -229,6 +229,9 @@ main (int argc, char **argv)
}
gdk_set_allowed_backends (GDK_BACKEND);
+
+ /* GDK would fail to initialize with e.g. GDK_BACKEND=wayland */
+ g_unsetenv ("GDK_BACKEND");
#endif
error = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]