[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: g_timeout_add events stop when calling draw_brush()



On Sun, Feb 29, 2004 at 03:06:00PM -0800, Douglas Phillipson wrote:
> Douglas Phillipson wrote:
> >I'm using  g_timeout_add (500, grab_data, NULL) to aquire data from a 
> >file and shift it through an array with some procesing on it.  This all 
> >works fine.  At the end of the routine I call draw_brush to paint the 
> >data to the screen but the "timeout" event stops after the first call to 
> >draw_brush.  I can comment out the draw_brush() call and events happen 
> >as they should.  What might be causing this?
> A more general question related to the above problem.
> 
> I'm not drawing. I'm displaying chart like graphic data points.  Without 
>  touching any buttons or the screen, how can I force an update to my 
> draw_area once a second?  I'm using g_timeout_add to force a read of a 
> file, all working well.  But I'm trying to throw a expose event on the 
> draw area from the function called by the "timeout" callback.  It 
> doesn't seem to force a screen update via draw_brush.  Any suggestions?
>

I'm not quite sure I understand what you're trying to do, but you
shouldn't draw from anywhere outside of handling an expose event. If
you want to "force" an expose event then use gtk_widget_queue_draw.

--jkl



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]