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
This commit is contained in:
Руслан Ижбулатов 2015-12-27 03:37:21 +00:00
parent ba89fbd72d
commit 7eb9f5f8ef

View File

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