diff options
author | 2009-12-06 21:20:56 +0100 | |
---|---|---|
committer | 2009-12-06 21:20:56 +0100 | |
commit | f13d1a5ef35117bb9010784549e218bf0c460068 (patch) | |
tree | 98e4d65b21ea58073dd3b9d3aa379fe0a02c5e24 | |
parent | 77f19717a6dafd725c755b1c4289d1faae0fac2f (diff) |
fixed race condition in update_songinfo;
also seekbar drawing is much smoother now
-rw-r--r-- | plugins/gtkui/gtkui.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index 8c1d265c..81ba6571 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -48,8 +48,8 @@ static int sb_context_id = -1; static char sb_text[512]; static float last_songpos = -1; -static void -update_songinfo (void) { +static gboolean +update_songinfo (gpointer ctx) { char sbtext_new[512] = "-"; float songpos = last_songpos; @@ -146,6 +146,7 @@ update_songinfo (void) { } } } + return FALSE; } gboolean @@ -281,7 +282,7 @@ gtkui_on_playlistchanged (DB_event_t *ev, uintptr_t data) { static int gtkui_on_frameupdate (DB_event_t *ev, uintptr_t data) { - update_songinfo (); + g_idle_add (update_songinfo, NULL); } static int |