Re: [gtk-vnc-devel] [Q] gvncviewer with gthread



On Mon, Feb 04, 2008 at 09:52:28PM -0600, Anthony Liguori wrote:
> Hi Atsushi,
> 
> Atsushi SAKAI wrote:
> > Hi, Anthony
> >
> > I have a question about Authenication window 
> > in sample program gvncviewer with gthread.
> >
> > If I select --with-coroutine=ucontext,
> > Authenication window appeared.
> >
> > But If I select --with-coroutine=gthread,
> > Authenication window appeared but just white blank.
> >
> > Is there any reason exists?
> >   
> 
> It looks like it's an issue with gtk_dialog_run().  This function enters 
> a recursive main loop which is a generally unsafe thing to do in gtk.  
> It's unfortunately really that it does this.
> 
> It may be that we need to issue signals from the system coroutine 
> instead of the vnc coroutine.  The vnc coroutine is running a separate 
> thread and I'm pretty sure that will confuse gtk greatly.  I'll look 
> into it.

Raising signals from other threads is no trouble - *providing* that
the app has called the gtk_init_threads(), and in their signal handler
*must* grab the GTK thread lock before doing anything. Of course apps
aren't supposed to know that gvnc is using threads, so perhaps we do need
to take care to raise the signal from the main coroutine. I've thought
about this before and its not too pleasant :-(

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




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