From e6a4cc8ba239bb339ce8c2dec4704153678984a3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 21 Feb 2024 12:33:19 -0500 Subject: [PATCH] x11: Shadows require compositing We can only do client-side shadows if we have an rgba visual and a compositing wm. Fallout from 6e7893d5. Fixes: #6464 --- gdk/x11/gdkdisplay-x11.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 1a4ad06b8d..87181f481d 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -1430,6 +1430,8 @@ gdk_x11_display_open (const char *display_name) int maj, min; char *cm_name; gboolean frame_extents; + gboolean rgba; + gboolean composited; XInitThreads (); @@ -1646,7 +1648,10 @@ gdk_x11_display_open (const char *display_name) frame_extents = gdk_x11_screen_supports_net_wm_hint (gdk_x11_display_get_screen (display), g_intern_static_string ("_GTK_FRAME_EXTENTS")); - gdk_display_set_shadow_width (display, frame_extents); + rgba = gdk_display_is_rgba (display); + composited = gdk_display_is_composited (display); + + gdk_display_set_shadow_width (display, frame_extents && rgba && composited); gdk_display_emit_opened (display);