[gtk+] window: Reinstate logic for should_use_csd()



commit f043fd532dc66a7abb1d4ea57c666655330cc429
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Jun 18 14:48:58 2015 +0100

    window: Reinstate logic for should_use_csd()
    
    The old should_use_csd() function would return FALSE if the GTK_CSD
    environment variable is unset; the change in commit c5e5ee67490e7e7
    made it return TRUE if GTK_CSD is unset. This has a cascade effect
    on the window size, which causes invalid rectangles to bubble down
    to Pixman.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751140

 gtk/gtkwindow.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index fb8e0b0..7f4e74b 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4079,8 +4079,7 @@ gtk_window_can_use_csd (GtkWindow *window)
 
   csd_env = g_getenv ("GTK_CSD");
 
-  /* If GTK_CSD is unset we default to CSD support */
-  return csd_env == NULL || (strcmp (csd_env, "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]