Merge branch 'x11-shadow-fix' into 'main'

x11: Shadows require compositing

Closes #6464

See merge request GNOME/gtk!6928
This commit is contained in:
Matthias Clasen 2024-02-21 22:58:41 +00:00
commit c93fa922dc

View File

@ -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);