From f1d11fbd5d8363593190a3f9f0ecc10798fe4ea1 Mon Sep 17 00:00:00 2001 From: leot Date: Fri, 4 Jan 2019 20:54:03 +0000 Subject: gtk3: Backport patch for upstream issue #1280 At least with wm/awesome this was particularly problematic and easily lead to crash of gtk3 applications. PKGREVISION++ Patch and analysis from Zach McGrew, thank you Zach! --- x11/gtk3/Makefile | 3 ++- x11/gtk3/distinfo | 3 ++- x11/gtk3/patches/patch-gdk_x11_gdkwindow-x11.c | 36 ++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 x11/gtk3/patches/patch-gdk_x11_gdkwindow-x11.c (limited to 'x11/gtk3') diff --git a/x11/gtk3/Makefile b/x11/gtk3/Makefile index f36dd73dd48..e79585f2c56 100644 --- a/x11/gtk3/Makefile +++ b/x11/gtk3/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.124 2019/01/01 19:57:58 leot Exp $ +# $NetBSD: Makefile,v 1.125 2019/01/04 20:54:03 leot Exp $ DISTNAME= gtk+-3.24.2 PKGNAME= ${DISTNAME:S/gtk/gtk3/} +PKGREVISION= 1 CATEGORIES= x11 gnome MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gtk+/${PKGVERSION_NOREV:R}/} EXTRACT_SUFX= .tar.xz diff --git a/x11/gtk3/distinfo b/x11/gtk3/distinfo index ef3d751a3be..8e20eeca498 100644 --- a/x11/gtk3/distinfo +++ b/x11/gtk3/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.61 2019/01/01 19:57:58 leot Exp $ +$NetBSD: distinfo,v 1.62 2019/01/04 20:54:03 leot Exp $ SHA1 (gtk+-3.24.2.tar.xz) = 3c1d2c716cd17ac85554b130f92c22dadb4e04ad RMD160 (gtk+-3.24.2.tar.xz) = 8229a1eef276abb01ea3924a7d6c8a1679e94eb0 @@ -10,6 +10,7 @@ SHA1 (patch-configure) = d531b33e52facf960058f1223b70db680da35300 SHA1 (patch-configure.ac) = 68793f40752f25ccaecc958c72c23a504670bea5 SHA1 (patch-docs_tools_shooter.c) = e1fcd9decfaaee45ff4fa9b82bdb0c85e3d176fe SHA1 (patch-gdk_x11_gdkscreen-x11.h) = 455d6c3de8421984ba3c99baf51cd31982a3df78 +SHA1 (patch-gdk_x11_gdkwindow-x11.c) = aee82e913181b6aa49294981dfe58f1e1a571039 SHA1 (patch-gdk_x11_gdkwindow-x11.h) = c80f7c9d5a570817e54fd74fa903a53400dc6f64 SHA1 (patch-gtk_a11y_gtkaccessibility.c) = 13232c85bd570f21ea03153dacde4ca98c7c76a8 SHA1 (patch-gtk_fallback-c89.c) = eaf5ac8aace9eab673eed0e265d4cb2617bf1fcd diff --git a/x11/gtk3/patches/patch-gdk_x11_gdkwindow-x11.c b/x11/gtk3/patches/patch-gdk_x11_gdkwindow-x11.c new file mode 100644 index 00000000000..6479c2e1709 --- /dev/null +++ b/x11/gtk3/patches/patch-gdk_x11_gdkwindow-x11.c @@ -0,0 +1,36 @@ +$NetBSD: patch-gdk_x11_gdkwindow-x11.c,v 1.1 2019/01/04 20:54:03 leot Exp $ + +x11: Fix deprecation macro use + +G_GNUC_END_IGNORE_DEPRECATIONS terminates the if statement and does not +consider the following block to be part of the if. So that block was +always taken irregardless of the pattern. + +Fixes #1280 + +From upstream commit: + + + +--- gdk/x11/gdkwindow-x11.c.orig 2018-12-12 14:08:44.000000000 +0000 ++++ gdk/x11/gdkwindow-x11.c +@@ -2985,6 +2985,7 @@ gdk_window_x11_set_background (GdkWindow + double r, g, b, a; + cairo_surface_t *surface; + cairo_matrix_t matrix; ++ cairo_pattern_t *parent_relative_pattern; + + if (GDK_WINDOW_DESTROYED (window)) + return; +@@ -2997,8 +2998,10 @@ gdk_window_x11_set_background (GdkWindow + } + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS +- if (pattern == gdk_x11_get_parent_relative_pattern ()) ++ parent_relative_pattern = gdk_x11_get_parent_relative_pattern (); + G_GNUC_END_IGNORE_DEPRECATIONS ++ ++ if (pattern == parent_relative_pattern) + { + GdkWindow *parent; + -- cgit v1.2.3