guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: gtk+: Graft upstream fix for crashes in Emacs and IceCat.


From: guix-commits
Subject: 01/01: gnu: gtk+: Graft upstream fix for crashes in Emacs and IceCat.
Date: Sat, 30 Mar 2019 02:38:12 -0400 (EDT)

mhw pushed a commit to branch master
in repository guix.

commit bc91562939ee002e84c95d13c907482b6d1e9339
Author: Mark H Weaver <address@hidden>
Date:   Fri Mar 29 23:28:45 2019 -0400

    gnu: gtk+: Graft upstream fix for crashes in Emacs and IceCat.
    
    Fixes <https://bugs.gnu.org/34454>.
    
    * gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/gtk.scm (gtk+/fixed): New variable.
    (gtk+)[replacement]: New field.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/gtk.scm                               | 15 +++++++++++-
 .../patches/gtk3-fix-deprecation-macro-use.patch   | 28 ++++++++++++++++++++++
 3 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 833944b..e32b029 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -877,6 +877,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch       \
   %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \
   %D%/packages/patches/gtk2-theme-paths.patch                  \
+  %D%/packages/patches/gtk3-fix-deprecation-macro-use.patch    \
   %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch       \
   %D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \
   %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index aab3927..83aadfd 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <address@hidden>
 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès 
<address@hidden>
-;;; Copyright © 2014, 2015, 2017, 2018 Mark H Weaver <address@hidden>
+;;; Copyright © 2014, 2015, 2017, 2018, 2019 Mark H Weaver <address@hidden>
 ;;; Copyright © 2014 Eric Bavier <address@hidden>
 ;;; Copyright © 2015 Federico Beffa <address@hidden>
 ;;; Copyright © 2015 Paul van der Walt <address@hidden>
@@ -694,6 +694,7 @@ application suites.")
    ;; NOTE: When updating the version of 'gtk+', the hash of 'mate-themes' in
    ;;       mate.scm will also need to be updated.
    (version "3.24.2")
+   (replacement gtk+/fixed)
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -787,6 +788,18 @@ application suites.")
            (variable "GUIX_GTK3_PATH")
            (files '("lib/gtk-3.0")))))))
 
+;; Fixes a bug in Gtk that causes crashes in IceCat and Emacs.
+;; See <https://bugs.gnu.org/34454>, <https://bugs.gnu.org/34658>,
+;; and <https://gitlab.gnome.org/GNOME/gtk/issues/1523>.
+(define gtk+/fixed
+  (package
+    (inherit gtk+)
+    (source (origin
+              (inherit (package-source gtk+))
+              (patches
+               (cons (search-patch "gtk3-fix-deprecation-macro-use.patch")
+                     (origin-patches (package-source gtk+))))))))
+
 ;;;
 ;;; Guile bindings.
 ;;;
diff --git a/gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch 
b/gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch
new file mode 100644
index 0000000..e933555
--- /dev/null
+++ b/gnu/packages/patches/gtk3-fix-deprecation-macro-use.patch
@@ -0,0 +1,28 @@
+Copied from <https://gitlab.gnome.org/GNOME/gtk/commit/e3a1593a>.
+Fixes upstream bugs <https://gitlab.gnome.org/GNOME/gtk/issues/1523>
+and <https://gitlab.gnome.org/GNOME/gtk/issues/1280>.
+
+diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
+index 
97ada6d73919fba3dfe192dd66929e90bc7677bb..764e39495f7edb0c3efe41cca25b8bee4778887d
 100644
+--- a/gdk/x11/gdkwindow-x11.c
++++ b/gdk/x11/gdkwindow-x11.c
+@@ -2985,6 +2985,7 @@ gdk_window_x11_set_background (GdkWindow      *window,
+   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      *window,
+     }
+ 
+ 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;
+ 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]