[wxGTK/el4/master] - added fix for crashes during DnD (#626012)

Dan Horák sharkcz at fedoraproject.org
Mon Nov 29 17:57:17 UTC 2010


commit 4f66ec5ef014e5e17d73ffeb3bc15a6ad711f453
Author: Dan Horák <dan at danny.cz>
Date:   Mon Nov 29 18:54:18 2010 +0100

    - added fix for crashes during DnD (#626012)

 wxGTK-2.8.11-dnd.patch |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 wxGTK.spec             |    8 +++++++-
 2 files changed, 53 insertions(+), 1 deletions(-)
---
diff --git a/wxGTK-2.8.11-dnd.patch b/wxGTK-2.8.11-dnd.patch
new file mode 100644
index 0000000..9583a1e
--- /dev/null
+++ b/wxGTK-2.8.11-dnd.patch
@@ -0,0 +1,46 @@
+Index: src/gtk/dnd.cpp
+===================================================================
+--- src/gtk/dnd.cpp	(revision 65479)
++++ src/gtk/dnd.cpp	(revision 65480)
+@@ -946,21 +946,27 @@
+ 
+ void wxDropSource::UnregisterWindow()
+ {
+-    if (!m_widget)
+-        return;
++    if (m_widget)
++    {
++        g_signal_handlers_disconnect_by_func (m_widget,
++                                              (gpointer) source_drag_data_get,
++                                              this);
++        g_signal_handlers_disconnect_by_func (m_widget,
++                                              (gpointer) source_drag_data_delete,
++                                              this);
++        g_signal_handlers_disconnect_by_func (m_widget,
++                                              (gpointer) source_drag_begin,
++                                              this);
++        g_signal_handlers_disconnect_by_func (m_widget,
++                                              (gpointer) source_drag_end,
++                                              this);
++    }
+ 
+-    g_signal_handlers_disconnect_by_func (m_widget,
+-                                          (gpointer) source_drag_data_get,
+-                                          this);
+-    g_signal_handlers_disconnect_by_func (m_widget,
+-                                          (gpointer) source_drag_data_delete,
+-                                          this);
+-    g_signal_handlers_disconnect_by_func (m_widget,
+-                                          (gpointer) source_drag_begin,
+-                                          this);
+-    g_signal_handlers_disconnect_by_func (m_widget,
+-                                          (gpointer) source_drag_end,
+-                                          this);
++    if (m_iconWindow)
++    {
++        g_signal_handlers_disconnect_by_func (m_iconWindow,
++                                              (gpointer) gtk_dnd_window_configure_callback, this);
++    }
+ }
+ 
+ #endif
diff --git a/wxGTK.spec b/wxGTK.spec
index 7f40e71..3681bf7 100644
--- a/wxGTK.spec
+++ b/wxGTK.spec
@@ -6,7 +6,7 @@
 
 Name:           wxGTK
 Version:        2.8.11
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        GTK2 port of the wxWidgets GUI library
 # The wxWindows licence is the LGPL with a specific exemption allowing
 # distribution of derived binaries under any terms. (This will eventually
@@ -15,6 +15,8 @@ License:        wxWidgets
 Group:          System Environment/Libraries
 URL:            http://www.wxwidgets.org/
 Source0:        http://dl.sf.net/wxwindows/%{name}-%{version}.tar.bz2
+# https://bugzilla.redhat.com/show_bug.cgi?id=626012
+Patch0:         %{name}-2.8.11-dnd.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -119,6 +121,7 @@ libraries or the X Window System.
 
 %prep
 %setup -q
+%patch0 -p0 -b .dnd
 
 sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure
 
@@ -260,6 +263,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Nov 29 2010 Dan Horák <dan[at]danny.cz> - 2.8.11-2
+- added fix for crashes during DnD (#626012)
+
 * Mon Apr 26 2010 Dan Horák <dan[at]danny.cz> - 2.8.11-1
 - update to 2.8.11
 


More information about the scm-commits mailing list