From c5a09dcbd7e200cc174f1c7ed621b7abae062454 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Apr 07 2017 07:40:23 +0000 Subject: Workaround for fix crash at drag-and-drop on treeview (bug 1439162) --- diff --git a/spacefm-1.0.5-drag_suggested_action_internal.patch b/spacefm-1.0.5-drag_suggested_action_internal.patch new file mode 100644 index 0000000..02259c9 --- /dev/null +++ b/spacefm-1.0.5-drag_suggested_action_internal.patch @@ -0,0 +1,58 @@ +From 7308bb6ca02293332a4d229305a6212d45d25282 Mon Sep 17 00:00:00 2001 +From: Justin Kinnaird +Date: Wed, 15 Feb 2017 18:27:00 -0600 +Subject: [PATCH] Fix for https://github.com/IgnorantGuru/spacefm/issues/670 + +--- + src/ptk/ptk-dir-tree-view.c | 34 ++++++++++++++++++++-------------- + 1 file changed, 20 insertions(+), 14 deletions(-) + +diff --git a/src/ptk/ptk-dir-tree-view.c b/src/ptk/ptk-dir-tree-view.c +index f82c361..94542aa 100644 +--- a/src/ptk/ptk-dir-tree-view.c ++++ b/src/ptk/ptk-dir-tree-view.c +@@ -850,24 +850,30 @@ gboolean on_dir_tree_view_drag_motion ( GtkWidget *widget, + } + #if GTK_CHECK_VERSION (3, 0, 0) + /* hack to be able to call the default handler with the correct suggested_action */ +- struct _GdkDragContext { +- GObject parent_instance; ++ struct _GdkDragContext { ++ GObject parent_instance; + +- /*< private >*/ +- GdkDragProtocol protocol; +- +- gboolean is_source; +- GdkWindow *source_window; +- GdkWindow *dest_window; ++ /*< private >*/ ++ GdkDragProtocol protocol; ++#if GTK_CHECK_VERSION (3,22,0) ++ GdkDisplay *display; ++#endif ++ gboolean is_source; ++ GdkWindow *source_window; ++ GdkWindow *dest_window; ++ GdkWindow *drag_window; + +- GList *targets; +- GdkDragAction actions; +- GdkDragAction suggested_action; +- GdkDragAction action; ++ GList *targets; ++ GdkDragAction actions; ++ GdkDragAction suggested_action; ++ GdkDragAction action; + +- guint32 start_time; ++ guint32 start_time; + +- GdkDevice *device; ++ GdkDevice *device; ++#if GTK_CHECK_VERSION (3,22,0) ++ guint drop_done : 1; /* Whether gdk_drag_drop_done() was performed */ ++#endif + }; + ((struct _GdkDragContext *)drag_context)->suggested_action = suggested_action; + #else diff --git a/spacefm.spec b/spacefm.spec index 6e0a4a2..a3bdaa9 100644 --- a/spacefm.spec +++ b/spacefm.spec @@ -1,6 +1,6 @@ Name: spacefm Version: 1.0.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Multi-panel tabbed file and desktop manager License: GPLv3+ @@ -8,6 +8,12 @@ URL: http://ignorantguru.github.io/spacefm/ Source0: https://github.com/IgnorantGuru/spacefm/archive/%{version}/%{name}-%{version}.tar.gz # Force x11 as gdk backend (bug 1438277) Patch0: spacefm-1.0.5-force-x11-backend.patch +# FIXME +# Workaround for fix crash at drag-and-drop on treeview (bug 1439162) +# https://github.com/IgnorantGuru/spacefm/issues/670 +# https://github.com/Teklad/spacefm-ng/commit/7308bb6ca02293332a4d229305a6212d45d25282 +# This workaround is dirty, as it touches GdkRragContext internal directly +Patch1: spacefm-1.0.5-drag_suggested_action_internal.patch BuildRequires: libX11-devel BuildRequires: desktop-file-utils @@ -35,6 +41,7 @@ This package contains Faenza theme files for spacefm. %prep %setup -q %patch0 -p1 -b .x11 +%patch1 -p1 -b .drag_struct_size find . -name \*.c -print0 | xargs --null chmod 0644 %build @@ -119,6 +126,9 @@ gtk-update-icon-cache %{_datadir}/icons/Faenza &>/dev/null || : %{_datadir}/icons/Faenza/apps/*/%{name}* %changelog +* Fri Apr 7 2017 Mamoru TASAKA - 1.0.5-5 +- Workaround for fix crash at drag-and-drop on treeview (bug 1439162) + * Wed Apr 5 2017 Mamoru TASAKA - 1.0.5-4 - Force x11 as gdk backend (bug 1438277)