[Glade-users] Sending events (somewhat OT)

Steve Blackwell zephod at cfl.rr.com
Sat Mar 14 10:51:38 EDT 2009


His Majesty <balakkvj at gmail.com> wrote: 

> Obviously the gtk_main expects a return.
> You can stop this behaviour using g_main_context_iteration
>(NULL,FALSE);
> 
> See if this works for you.

I don't think I'm understanding you correctly. 

If I use the line you suggest, the main program will exit normally
after one call to g_main_context_iteration(). If I put
g_main_context_iteration() in a loop, it will suck up all the cpu time
because it is not blocking.

Perhaps I can rephrase my original question as:

"Why does gtk_main() respond differently to a client-event than it does
to a mouse or keyboard event?"

Here is the code fragment that I'm using to send the event.
event_log_dialog is the top level window that contains the TreeView
widget that I want my data displayed in.

 client_msg = gdk_event_new( GDK_CLIENT_EVENT ); 
 gtk_propagate_event ( event_log_dialog, client_msg );

Steve.


More information about the Glade-users mailing list