[Glade-users] Sending events (somewhat OT)

Steve zephod at cfl.rr.com
Fri Mar 20 14:31:27 EDT 2009


---- Steve <zephod at cfl.rr.com> wrote: 
> 
> ---- Tristan Van Berkom <tristan.van.berkom at gmail.com> wrote: 
> > On Tue, Mar 17, 2009 at 4:33 PM, Steve <zephod at cfl.rr.com> wrote:
> > >
> > > ---- Lukasz Gromotowicz <gromot at gmail.com> wrote:
> > >> Trivial question - do you enable gtk threads in your application and do you
> > >> use gdk_thread_enter() and gdk_threads_leave() before accessing TreeView
> > >> from the second (USB) thread?
> > >
> > > Trivial answer - no.
> > >
> > > But seriously, I have since chenged my code so that I don't access the TreeView or any other GTK code from the 2nd thread. I now send the data to the 1st thread via a client event. My problem still exists though. I still have to move the mouse or press a key to get the data to show up.

I spent a couple of days doing some research and as a result I changed my code to use g_thread_create() instead of pthread_create(), added the gdk_threads_enter() and gdk_threads_leave() calls and gave up trying to pass data from one thread to the other. Now everything works as I expect.

Thanks for your suggestions and patience.
Steve


More information about the Glade-users mailing list