[Glade-users] Sending events (somewhat OT)

I have written a program using glade 3 that has 2 threads. The main
thread handles user input from the GUI while the second thread monitors
a USB port for input. When data arrives at the USB port, it is processed
and written to a GtkTreeView widget. 

The problem is that the data does not appear in the TreeView until I
move the mouse or press a key. I think that this is because the main
thread controlling the GUI is blocking in gtk_main() until an event
arrives. So I added code to the second thread to send a
GDK_CLIENT_EVENT to the GtkDialog widget that contains the TreeView. 

It didn't work. 

I can tell that the event was sent and received because
I added a client-event callback to the GtkDialog window and I can see
that this got executed. The callback doesn't do anything but I assumed
(clearly incorrectly) that the arrival of the event would cause
gtk_main() to loop and paint the pending Treeview data.

What am I doing wrong here? 

Thanks for any suggestions.

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