Mercurial > dwindows
changeset 974:e506776e7fd3
Fixed a few things I missed when merging from the GTK3 module.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 05 May 2011 23:16:38 +0000 |
parents | 5c5447fd0cc9 |
children | 52cd98b7e45c |
files | gtk/dw.c |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk/dw.c Thu May 05 23:11:25 2011 +0000 +++ b/gtk/dw.c Thu May 05 23:16:38 2011 +0000 @@ -7724,7 +7724,6 @@ if(layout) { - int index = _find_thread_index(dw_thread_id()); GdkColor *foreground = pthread_getspecific(_dw_fg_color_key); GdkColor *background = pthread_getspecific(_dw_bg_color_key); @@ -8786,13 +8785,21 @@ { void (*threadfunc)(void *) = NULL; void **tmp = (void **)data; + GdkColor *foreground, *background; threadfunc = (void (*)(void *))tmp[0]; - _dw_thread_add(dw_thread_id()); + /* Initialize colors */ + _init_thread(); + threadfunc(tmp[1]); - _dw_thread_remove(dw_thread_id()); free(tmp); + + /* Free colors */ + if((foreground = pthread_getspecific(_dw_fg_color_key))) + free(foreground); + if((background = pthread_getspecific(_dw_bg_color_key))) + free(background); } /*