mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
window: enable client side decorations deactivation with wayland backend
This commit is contained in:
parent
e2745794b1
commit
45216c4f60
@ -5390,6 +5390,7 @@ static gboolean
|
||||
gdk_window_should_use_csd (GtkWindow *window)
|
||||
{
|
||||
GtkWindowPrivate *priv = window->priv;
|
||||
const gchar *csd_env;
|
||||
|
||||
if (!priv->decorated)
|
||||
return FALSE;
|
||||
@ -5397,17 +5398,20 @@ gdk_window_should_use_csd (GtkWindow *window)
|
||||
if (priv->type == GTK_WINDOW_POPUP)
|
||||
return FALSE;
|
||||
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
|
||||
return TRUE;
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_BROADWAY
|
||||
if (GDK_IS_BROADWAY_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
|
||||
return TRUE;
|
||||
#endif
|
||||
|
||||
return (g_strcmp0 (g_getenv ("GTK_CSD"), "1") == 0);
|
||||
csd_env = g_getenv ("GTK_CSD");
|
||||
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))) &&
|
||||
g_strcmp0 (csd_env, "0") != 0)
|
||||
return TRUE;
|
||||
#endif
|
||||
|
||||
return (g_strcmp0 (csd_env, "1") == 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user