[gtk+] W32: Prefer CSD by default
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] W32: Prefer CSD by default
- Date: Thu, 3 Mar 2016 07:42:14 +0000 (UTC)
commit 7eb9f5f8ef13f7fa8322fa5a6be461aa7f158c69
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Sun Dec 27 03:37:21 2015 +0000
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 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index b0bf61f..920f607 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]