new file mode 100644
@@ -0,0 +1,30 @@
+From 2ae299419ec7b15a59e2b2b8a5b266b9f29df5a4 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Thu, 22 Jan 2026 12:52:34 +0100
+Subject: [PATCH] shell-app-usage.c: only include x11 headers if HAVE_X11
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+
+Upstream-Status: Pending
+---
+ src/shell-app-usage.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/shell-app-usage.c b/src/shell-app-usage.c
+index 9e57a91b2..77adcf6a2 100644
+--- a/src/shell-app-usage.c
++++ b/src/shell-app-usage.c
+@@ -5,8 +5,10 @@
+ #include <string.h>
+ #include <stdlib.h>
+
++#ifdef HAVE_X11
+ #include <X11/Xlib.h>
+ #include <X11/Xatom.h>
++#endif
+ #include <glib.h>
+ #include <gio/gio.h>
+ #include <meta/display.h>
+--
+2.52.0
+
@@ -24,7 +24,7 @@ DEPENDS = " \
inherit gnomebase gsettings gettext gobject-introspection gtk-icon-cache features_check bash-completion
-REQUIRED_DISTRO_FEATURES = "x11 polkit systemd pam"
+REQUIRED_DISTRO_FEATURES = "polkit systemd pam"
GTKIC_VERSION = "4"
GTKDOC_MESON_OPTION = "gtk_doc"
@@ -33,6 +33,7 @@ GIR_MESON_OPTION = ""
# gobject-introspection is mandatory and cannot be configured
REQUIRED_DISTRO_FEATURES += "gobject-introspection-data"
+SRC_URI += "file://0001-shell-app-usage.c-only-include-x11-headers-if-HAVE_X.patch"
SRC_URI[archive.sha256sum] = "fb0203fc748593f14e51732618e1f042525fd719764a0fdb0ee3f6fe413a9b2b"
PACKAGECONFIG ??= "bluetooth nm ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
Signed-off-by: Markus Volk <f_l_k@t-online.de> --- ...c-only-include-x11-headers-if-HAVE_X.patch | 30 +++++++++++++++++++ .../gnome-shell/gnome-shell_48.3.bb | 3 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 meta-gnome/recipes-gnome/gnome-shell/gnome-shell/0001-shell-app-usage.c-only-include-x11-headers-if-HAVE_X.patch