Update to 2.24.25
This commit is contained in:
parent
26124126d1
commit
f8f6d8d3d0
1
.gitignore
vendored
1
.gitignore
vendored
@ -27,3 +27,4 @@ gtk+-2.21.5.tar.bz2
|
||||
/gtk+-2.24.22.tar.bz2
|
||||
/gtk+-2.24.23.tar.xz
|
||||
/gtk+-2.24.24.tar.xz
|
||||
/gtk+-2.24.25.tar.xz
|
||||
|
@ -1,31 +0,0 @@
|
||||
From 1d0e2d58385bd01fdb753bf40ba2f4c32ccd0cc8 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Clasen <mclasen@redhat.com>
|
||||
Date: Mon, 29 Sep 2014 16:05:57 -0400
|
||||
Subject: [PATCH] pixbuf engine: Avoid a crash if widget is NULL
|
||||
|
||||
Commit 85f2a721cf introduced an unconditional call to
|
||||
gtk_widget_get_direction(). This does not work for 'foreign'
|
||||
uses of the theme engine, e.g. in Qt, where widget is NULL.
|
||||
|
||||
This was reported as a crash in Fedora here:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=924683
|
||||
---
|
||||
modules/engines/pixbuf/pixbuf-draw.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/engines/pixbuf/pixbuf-draw.c b/modules/engines/pixbuf/pixbuf-draw.c
|
||||
index 9239bd1..5448d81 100644
|
||||
--- a/modules/engines/pixbuf/pixbuf-draw.c
|
||||
+++ b/modules/engines/pixbuf/pixbuf-draw.c
|
||||
@@ -131,7 +131,7 @@ draw_simple_image(GtkStyle *style,
|
||||
match_data->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
}
|
||||
|
||||
- if (!(match_data->flags & THEME_MATCH_DIRECTION))
|
||||
+ if (widget && !(match_data->flags & THEME_MATCH_DIRECTION))
|
||||
{
|
||||
match_data->flags |= THEME_MATCH_DIRECTION;
|
||||
match_data->direction = gtk_widget_get_direction (widget);
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,88 +0,0 @@
|
||||
From fbf38d16bcc26630f0f721d266509f5bc292f606 Mon Sep 17 00:00:00 2001
|
||||
From: Emmanuele Bassi <ebassi@gnome.org>
|
||||
Date: Tue, 26 Aug 2014 12:07:34 +0100
|
||||
Subject: [PATCH] threads: Do not release the GDK lock if it hasn't been
|
||||
acquired yet
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Since GLib ≥ 2.41, attempting to release an unlocked mutex will abort(),
|
||||
as it happens on most systems already.
|
||||
|
||||
Given the lack of proper documentation on how to use GDK with threads,
|
||||
there is code in the wild that does:
|
||||
|
||||
gdk_threads_init ();
|
||||
gdk_init ();
|
||||
|
||||
...
|
||||
|
||||
gtk_main ();
|
||||
|
||||
instead of the idiomatically correct:
|
||||
|
||||
gdk_threads_init ();
|
||||
gdk_threads_enter ();
|
||||
|
||||
gtk_init ();
|
||||
|
||||
...
|
||||
|
||||
gtk_main ();
|
||||
|
||||
...
|
||||
|
||||
gdk_threads_leave ();
|
||||
|
||||
Which means that gtk_main() will try to release the GDK lock, and thus
|
||||
trigger an error from GLib.
|
||||
|
||||
we cannot really fix all the wrong code everywhere, and since it does
|
||||
not cost us anything, we can work around the issue inside GDK itself, by
|
||||
trying to acquire the GDK lock inside gdk_threads_leave() with
|
||||
trylock().
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=735428
|
||||
---
|
||||
gdk/gdk.c | 24 +++++++++++++++++++++++-
|
||||
1 file changed, 23 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdk/gdk.c b/gdk/gdk.c
|
||||
index 0106d8a..f722dbf 100644
|
||||
--- a/gdk/gdk.c
|
||||
+++ b/gdk/gdk.c
|
||||
@@ -434,7 +434,29 @@ static void
|
||||
gdk_threads_impl_unlock (void)
|
||||
{
|
||||
if (gdk_threads_mutex)
|
||||
- g_mutex_unlock (gdk_threads_mutex);
|
||||
+ {
|
||||
+ /* we need a trylock() here because trying to unlock a mutex
|
||||
+ * that hasn't been locked yet is:
|
||||
+ *
|
||||
+ * a) not portable
|
||||
+ * b) fail on GLib ≥ 2.41
|
||||
+ *
|
||||
+ * trylock() will either succeed because nothing is holding the
|
||||
+ * GDK mutex, and will be unlocked right afterwards; or it's
|
||||
+ * going to fail because the mutex is locked already, in which
|
||||
+ * case we unlock it as expected.
|
||||
+ *
|
||||
+ * this is needed in the case somebody called gdk_threads_init()
|
||||
+ * without calling gdk_threads_enter() before calling gtk_main().
|
||||
+ * in theory, we could just say that this is undefined behaviour,
|
||||
+ * but our documentation has always been *less* than explicit as
|
||||
+ * to what the behaviour should actually be.
|
||||
+ *
|
||||
+ * see bug: https://bugzilla.gnome.org/show_bug.cgi?id=735428
|
||||
+ */
|
||||
+ g_mutex_trylock (gdk_threads_mutex);
|
||||
+ g_mutex_unlock (gdk_threads_mutex);
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.1.0
|
||||
|
12
gtk2.spec
12
gtk2.spec
@ -17,8 +17,8 @@
|
||||
|
||||
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
|
||||
Name: gtk2
|
||||
Version: 2.24.24
|
||||
Release: 4%{?dist}
|
||||
Version: 2.24.25
|
||||
Release: 1%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.gtk.org
|
||||
@ -35,9 +35,6 @@ Patch2: icon-padding.patch
|
||||
Patch8: tooltip-positioning.patch
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=611313
|
||||
Patch15: window-dragging.patch
|
||||
Patch16: 0001-threads-Do-not-release-the-GDK-lock-if-it-hasn-t-bee.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=924683
|
||||
Patch17: 0001-pixbuf-engine-Avoid-a-crash-if-widget-is-NULL.patch
|
||||
|
||||
BuildRequires: atk-devel >= %{atk_version}
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
@ -149,8 +146,6 @@ This package contains developer documentation for the GTK+ widget toolkit.
|
||||
%patch2 -p1 -b .icon-padding
|
||||
%patch8 -p1 -b .tooltip-positioning
|
||||
%patch15 -p1 -b .window-dragging
|
||||
%patch16 -p1 -b .trylock
|
||||
%patch17 -p1 -b .qtcrash
|
||||
|
||||
%build
|
||||
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
|
||||
@ -340,6 +335,9 @@ gtk-query-immodules-2.0-%{__isa_bits} --update-cache
|
||||
%doc tmpdocs/examples
|
||||
|
||||
%changelog
|
||||
* Sat Oct 11 2014 Kalev Lember <kalevlember@gmail.com> - 2.24.25-1
|
||||
- Update to 2.24.25
|
||||
|
||||
* Mon Sep 29 2014 Matthias Clasen <mclasen@redhat.com> - 2.24.24-4
|
||||
- Avoid a crash in the pixbuf engine when used from Qt
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user