Re: GtkTextView and pthread



On Wed, May 07, 2003 at 12:06:06AM +0200, Pablo wrote:

I have a problem with repainting GtkTextView widget after modifying
GtkTextBuffer.
The application has two threads. One resposible for making widgets,
taking care of gtk events and the other one which takes care about
receiving data from a socket.
When the thread which receives data via the socket updates
GtkTextBuffer, this change is not visible in GtkTextView until I move a
mouse over the application window.

What should I do to make (from other thread) view to update itself? I
tried gtk_widget_queue_draw but without any improvement.


You can only use GTK+ from a single thread at a time; see the FAQ
about thread locks (gdk_threads_enter()) and all that.

If you follow this rule, then GtkTextView should be updating. If not
it's probably a bug of some kind.

Havoc



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