diff --git a/docker-builder-data/build/script/packet/gtk-3.22.12.files/0001-gtkwindow-Don-t-force-enable-CSD-under-Windows.patch b/docker-builder-data/build/script/packet/gtk-3.22.12.files/0001-gtkwindow-Don-t-force-enable-CSD-under-Windows.patch new file mode 100644 index 0000000..8c52ff6 --- /dev/null +++ b/docker-builder-data/build/script/packet/gtk-3.22.12.files/0001-gtkwindow-Don-t-force-enable-CSD-under-Windows.patch @@ -0,0 +1,35 @@ +From 07bbd9b206f9a8712e1d77a6f86e260023738247 Mon Sep 17 00:00:00 2001 +From: Christoph Reiter +Date: Thu, 28 Sep 2017 12:02:03 +0200 +Subject: [PATCH] gtkwindow: Don't force enable CSD under Windows + +CSD look a bit out of place under Windows, especially +when the application doesn't use the headerbar and the CSD +doesn't add any value. + +Instead let the application decide, like under X11. +It can still be force enabled through GTK_CSD=1 +--- + gtk/gtkwindow.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c +index 9f1e52ab04..7c6d874afb 100644 +--- a/gtk/gtkwindow.c ++++ b/gtk/gtkwindow.c +@@ -6107,12 +6107,6 @@ gtk_window_should_use_csd (GtkWindow *window) + return TRUE; + #endif + +-#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); + } + +-- +2.14.1 + diff --git a/docker-builder-data/build/script/packet/gtk-3.22.12.sh b/docker-builder-data/build/script/packet/gtk-3.22.12.sh index 2d8faf2..c83cfdb 100644 --- a/docker-builder-data/build/script/packet/gtk-3.22.12.sh +++ b/docker-builder-data/build/script/packet/gtk-3.22.12.sh @@ -15,6 +15,13 @@ if [ "$PLATFORM" = "win" ]; then PK_CONFIGURE_OPTIONS="--enable-introspection=no" fi +pkhook_prebuild() { + if [ "$PLATFORM" = "win" ]; then + cp --remove-destination "$UNPACK_PACKET_DIR/$PK_DIRNAME/gtk/gtkwindow.c" "gtk/gtkwindow.c" || return 1 + patch -p1 -i "$FILES_PACKET_DIR/0001-gtkwindow-Don-t-force-enable-CSD-under-Windows.patch" || return 1 + fi +} + pkinstall() { cd "$BUILD_PACKET_DIR/$PK_DIRNAME" local LOCAL_BIN="$BUILD_PACKET_DIR/$PK_DIRNAME/gtk"