Re: threading problems...please help with workaround



Any explanation as to WHY this works?

Thanks,

Ralph Walden



Brad House wrote:
> 
> Perfect! thanks a lot!!!!
> 
> -Brad
> 
> Sven Neumann wrote:
> >
> > Hi,
> >
> > Brad House <brad mainstreetsoftworks com> writes:
> >
> > > I posted yesterday, but am no closer to a solution
> > > with the suggestions I recieved...
> > >
> > > here is my improperly functioning code snipet....
> > >
> > >
> > > void *run_thread(void *args)
> > > {
> > >   int visible=1;
> > >   while (1)   {
> > >       sleep(1);
> > >       //GDK_THREADS_ENTER();
> > >       gdk_threads_enter();
> > >        if (visible) {
> > >           visible=0;
> > >           gtk_widget_hide(window);
> > >         } else {
> > >           visible=1;
> > >           gtk_widget_show(window);
> > >         }
> > >      //  g_main_iteration(FALSE);
> > >        gdk_threads_leave();
> > >        //GDK_THREADS_LEAVE();
> > >    }
> > > }
> >
> > insert a call to gdk_flush() before gdk_threads_leave().
> >
> > Salut, Sven
> 
> --
> -----------------------------
> Brad House
> Sr. Developer
> Main Street Softworks, Inc.
> 
> brad mainstreetsoftworks com
> (352) 378-8228
> -----------------------------
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list

-- 

Ralph E. Walden
Tripos, Inc.
rwalden tripos com




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