Fix bug in gtk_show_uri() which caused crashes when plugging in USB drives
This commit is contained in:
parent
257f0951be
commit
0574055d41
33
fix-gtk-show-uri-crash.patch
Normal file
33
fix-gtk-show-uri-crash.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From 7e29fc5b421a049c2b88453232eddeefed9f1b7b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cosimo Cecchi <cosimoc@gnome.org>
|
||||||
|
Date: Thu, 13 Jan 2011 15:03:49 +0000
|
||||||
|
Subject: gtkshow: don't call _get_display() on a NULL GdkScreen
|
||||||
|
|
||||||
|
gtk_show_uri() is documented to accept a NULL screen to mean the default
|
||||||
|
one. Calling gdk_screen_get_display() on a NULL object will cause
|
||||||
|
segfaults.
|
||||||
|
---
|
||||||
|
diff --git a/gtk/gtkshow.c b/gtk/gtkshow.c
|
||||||
|
index ac3d1ac..ad396a2 100644
|
||||||
|
--- a/gtk/gtkshow.c
|
||||||
|
+++ b/gtk/gtkshow.c
|
||||||
|
@@ -63,10 +63,16 @@ gtk_show_uri (GdkScreen *screen,
|
||||||
|
{
|
||||||
|
GdkAppLaunchContext *context;
|
||||||
|
gboolean ret;
|
||||||
|
+ GdkDisplay *display;
|
||||||
|
|
||||||
|
g_return_val_if_fail (uri != NULL, FALSE);
|
||||||
|
|
||||||
|
- context = gdk_display_get_app_launch_context (gdk_screen_get_display (screen));
|
||||||
|
+ if (screen != NULL)
|
||||||
|
+ display = gdk_screen_get_display (screen);
|
||||||
|
+ else
|
||||||
|
+ display = gdk_display_get_default ();
|
||||||
|
+
|
||||||
|
+ context = gdk_display_get_app_launch_context (display);
|
||||||
|
gdk_app_launch_context_set_screen (context, screen);
|
||||||
|
gdk_app_launch_context_set_timestamp (context, timestamp);
|
||||||
|
|
||||||
|
--
|
||||||
|
cgit v0.8.3.1
|
@ -11,7 +11,7 @@
|
|||||||
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
|
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
|
||||||
Name: gtk3
|
Name: gtk3
|
||||||
Version: 2.99.2
|
Version: 2.99.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://www.gtk.org
|
URL: http://www.gtk.org
|
||||||
@ -21,6 +21,8 @@ Source3: im-cedilla.conf
|
|||||||
|
|
||||||
BuildRequires: gnome-common autoconf automake intltool gettext
|
BuildRequires: gnome-common autoconf automake intltool gettext
|
||||||
|
|
||||||
|
# Fixes crash of gnome-settings-daemon when plugging in USB media, among other things
|
||||||
|
Patch0: fix-gtk-show-uri-crash.patch
|
||||||
#Patch2: 0001-New-tooltip-style.patch
|
#Patch2: 0001-New-tooltip-style.patch
|
||||||
|
|
||||||
BuildRequires: atk-devel >= %{atk_version}
|
BuildRequires: atk-devel >= %{atk_version}
|
||||||
@ -112,6 +114,7 @@ widget toolkit.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n gtk+-%{version}
|
%setup -q -n gtk+-%{version}
|
||||||
|
%patch0 -p1 -b .gtk-show-uri-gdk-screen
|
||||||
#%patch2 -p1 -b .fresh-tooltips
|
#%patch2 -p1 -b .fresh-tooltips
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -246,6 +249,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache
|
|||||||
%exclude %{_mandir}/man1/gtk-builder-convert.1.gz
|
%exclude %{_mandir}/man1/gtk-builder-convert.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 24 2011 Dan Williams <dcbw@redhat.com> 2.99.2-2
|
||||||
|
- Fix bug in gtk_show_uri() which caused crashes when plugging in USB drives
|
||||||
|
|
||||||
* Wed Jan 12 2011 Matthias Clasen <mclasen@redhat.com> 2.99.2-1
|
* Wed Jan 12 2011 Matthias Clasen <mclasen@redhat.com> 2.99.2-1
|
||||||
- Update to 2.99.2
|
- Update to 2.99.2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user