comparison gtk/dw.c @ 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 2497a806d34e
comparison
equal deleted inserted replaced
973:5c5447fd0cc9 974:e506776e7fd3
7722 { 7722 {
7723 PangoLayout *layout = pango_layout_new(context); 7723 PangoLayout *layout = pango_layout_new(context);
7724 7724
7725 if(layout) 7725 if(layout)
7726 { 7726 {
7727 int index = _find_thread_index(dw_thread_id());
7728 GdkColor *foreground = pthread_getspecific(_dw_fg_color_key); 7727 GdkColor *foreground = pthread_getspecific(_dw_fg_color_key);
7729 GdkColor *background = pthread_getspecific(_dw_bg_color_key); 7728 GdkColor *background = pthread_getspecific(_dw_bg_color_key);
7730 7729
7731 gdk_pango_context_set_colormap(context, _dw_cmap); 7730 gdk_pango_context_set_colormap(context, _dw_cmap);
7732 pango_layout_set_font_description(layout, font); 7731 pango_layout_set_font_description(layout, font);
8784 */ 8783 */
8785 void _dwthreadstart(void *data) 8784 void _dwthreadstart(void *data)
8786 { 8785 {
8787 void (*threadfunc)(void *) = NULL; 8786 void (*threadfunc)(void *) = NULL;
8788 void **tmp = (void **)data; 8787 void **tmp = (void **)data;
8788 GdkColor *foreground, *background;
8789 8789
8790 threadfunc = (void (*)(void *))tmp[0]; 8790 threadfunc = (void (*)(void *))tmp[0];
8791 8791
8792 _dw_thread_add(dw_thread_id()); 8792 /* Initialize colors */
8793 _init_thread();
8794
8793 threadfunc(tmp[1]); 8795 threadfunc(tmp[1]);
8794 _dw_thread_remove(dw_thread_id());
8795 free(tmp); 8796 free(tmp);
8797
8798 /* Free colors */
8799 if((foreground = pthread_getspecific(_dw_fg_color_key)))
8800 free(foreground);
8801 if((background = pthread_getspecific(_dw_bg_color_key)))
8802 free(background);
8796 } 8803 }
8797 8804
8798 /* 8805 /*
8799 * Allocates a shared memory region with a name. 8806 * Allocates a shared memory region with a name.
8800 * Parameters: 8807 * Parameters: