thunar: add a bugfix patch
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 11 Oct 2014 19:07:26 +0000 (22:07 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 11 Oct 2014 21:53:30 +0000 (00:53 +0300)
incorrect use of g_cond_timed_wait(), worked earlier because of luck?

recipes/xfce-base/thunar/fix_bad_use_of_g_cond_timed_wait.patch [new file with mode: 0644]
recipes/xfce-base/thunar_1.0.2.bb

diff --git a/recipes/xfce-base/thunar/fix_bad_use_of_g_cond_timed_wait.patch b/recipes/xfce-base/thunar/fix_bad_use_of_g_cond_timed_wait.patch
new file mode 100644 (file)
index 0000000..a9a65a6
--- /dev/null
@@ -0,0 +1,24 @@
+diff -ur Thunar-1.0.2_/thunar-vfs/thunar-vfs-monitor.c Thunar-1.0.2/thunar-vfs/thunar-vfs-monitor.c
+--- Thunar-1.0.2_/thunar-vfs/thunar-vfs-monitor.c      2014-10-11 21:20:20.044041895 +0300
++++ Thunar-1.0.2/thunar-vfs/thunar-vfs-monitor.c       2014-10-11 21:21:03.178275705 +0300
+@@ -809,13 +809,18 @@
+ void
+ thunar_vfs_monitor_wait (ThunarVfsMonitor *monitor)
+ {
+-  static const GTimeVal tv = { 2, 0 };
++  GTimeVal tv = { 0, 0 };
+   g_return_if_fail (THUNAR_VFS_IS_MONITOR (monitor));
+   g_mutex_lock (monitor->lock);
++
++  g_get_current_time (&tv);
++  g_time_val_add (&tv, 2 * 1000000);
++
+   while (g_atomic_int_get (&monitor->notifications_timer_id) != 0)
+-    g_cond_timed_wait (monitor->cond, monitor->lock, (GTimeVal *) &tv);
++    g_cond_timed_wait (monitor->cond, monitor->lock, &tv);
++
+   g_mutex_unlock (monitor->lock);
+ }
index 8f0689a..d6b13cb 100644 (file)
@@ -4,7 +4,7 @@ DEPENDS = "exo dbus-glib libexif xfce4-panel libice libsm gamin"
 RDEPENDS_${PN} = "libxfcegui4 exo dbus-glib libexif xfce4-panel libice libsm gamin"
 RRECOMMENDS_${PN} = "shared-mime-info"
 SECTION = "x11"
-PR = "r2"
+PR = "r3"
 
 inherit xfce46
 
@@ -13,6 +13,7 @@ XFCE_VERSION = "4.6.2"
 SRC_URI = " \
        http://www.us.xfce.org/archive/xfce-${XFCE_VERSION}/src/Thunar-${PV}.tar.bz2 \
        file://Ability_to_disable_trash_on_Thunar.patch;patch=1 \
+       file://fix_bad_use_of_g_cond_timed_wait.patch;patch=1 \
 "
 
 S = "${WORKDIR}/Thunar-${PV}/"