Re: Creating a Modal Dialog from a Routine Called by g_idle_add()



On Wednesday 21 March 2007 14:35, Marshall Lake wrote:
> I've run into a problem with my current project and I'm having difficulty
> finding the cause.  I'm sure the problem is because of a lack of
> understanding on my part concerning GTK.  I'm hoping someone here can prod
> me in the right direction.
>
> I have a routine called by g_idle_add() which updates the contents of an
> already-existing modal dialog with data received from a server software.
> This routine gets called continually until the data from the server
> ceases.  Certain data which is received causes a new modal dialog to be
> created which looks for user input.
>
> Things work fine until a new modal dialog needs to be created.  The dialog
> is created fine and the user input is accepted fine, but I cannot destroy
> the new modal dialog.  And at this point the routine is not called again
> by g_idle_add().  The program hangs, and the only thing I can do is kill
> the new modal dialog which in turn kills the whole program.
>
> Can someone clue me in to what might be going on?

g_idle_add() callbacks execute in the main loop.  So you are blocking the main 
loop (if it is a blocking dialog).

Chris




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