[gtk+] window: enable client side decorations deactivation with wayland backend



commit 45216c4f6040a84aeabd53bace79a58e354f9ab7
Author: Lionel Landwerlin <llandwerlin gmail com>
Date:   Wed Dec 4 11:45:46 2013 +0000

    window: enable client side decorations deactivation with wayland backend

 gtk/gtkwindow.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 29c3fcc..e1aea9c 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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))))
+#ifdef GDK_WINDOWING_BROADWAY
+  if (GDK_IS_BROADWAY_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))))
+  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 (g_getenv ("GTK_CSD"), "1") == 0);
+  return (g_strcmp0 (csd_env, "1") == 0);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]