From 7eb9f5f8ef13f7fa8322fa5a6be461aa7f158c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Sun, 27 Dec 2015 03:37:21 +0000 Subject: [PATCH] W32: Prefer CSD by default Will make GTK+ more willing to use CSD for all normal windows without being asked to. Lack of desktop composition will, of course, prevent it from using CSD (in theory). GTK_CSD=0 will force CSD to NOT to be used whenever possible (i.e. in cases where CSD is not specifically requested by a window, by design). https://bugzilla.gnome.org/show_bug.cgi?id=759899 --- gtk/gtkwindow.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index b0bf61febb..920f60776b 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -6023,6 +6023,8 @@ gtk_window_should_use_csd (GtkWindow *window) if (priv->type == GTK_WINDOW_POPUP) return FALSE; + csd_env = g_getenv ("GTK_CSD"); + #ifdef GDK_WINDOWING_BROADWAY if (GDK_IS_BROADWAY_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window)))) return TRUE; @@ -6038,7 +6040,11 @@ gtk_window_should_use_csd (GtkWindow *window) return TRUE; #endif - csd_env = g_getenv ("GTK_CSD"); +#ifdef GDK_WINDOWING_WIN32 + if (g_strcmp0 (csd_env, "0") != 0 && + GDK_IS_WIN32_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window)))) + return TRUE; +#endif return (g_strcmp0 (csd_env, "1") == 0); }