diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-10-26 21:47:56 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-10-26 21:47:56 +0100 |
commit | 25f70828a1609627619a3ea63f1efce5e5438158 (patch) | |
tree | dbbdfbb3fa13d2da098186961e4ad719c9b211a8 /gtkplaylist.c | |
parent | 7d0f7176f06f933ae2c8d5ca6e7336b70875ffdc (diff) |
fixed random crash because of gdk locking
Diffstat (limited to 'gtkplaylist.c')
-rw-r--r-- | gtkplaylist.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/gtkplaylist.c b/gtkplaylist.c index a4f4e125..43a98fae 100644 --- a/gtkplaylist.c +++ b/gtkplaylist.c @@ -1894,16 +1894,9 @@ gtkpl_current_track_changed (playItem_t *it) { set_tray_tooltip (str); } -struct songchange_t { - int from, to; -}; - -static gboolean -gtkpl_songchanged_callback (void *data) { - struct songchange_t *sc = (struct songchange_t *)data; - int from = sc->from; - int to = sc->to; - free (sc); +void +gtkpl_songchanged_wrapper (int from, int to) { + GDK_THREADS_ENTER (); // update window title if (from >= 0 || to >= 0) { if (to >= 0) { @@ -1919,13 +1912,5 @@ gtkpl_songchanged_callback (void *data) { } // update playlist view gtkpl_songchanged (&main_playlist, from, to); - return FALSE; -} - -void -gtkpl_songchanged_wrapper (int from, int to) { - struct songchange_t *sc = malloc (sizeof (struct songchange_t)); - sc->from = from; - sc->to = to; - g_idle_add (gtkpl_songchanged_callback, sc); + GDK_THREADS_LEAVE (); } |