Window not updating from within thread
- From: Dave Andruczyk <djandruczyk yahoo com>
- To: gtk-app-devel-list gnome org
- Subject: Window not updating from within thread
- Date: Sun, 16 Nov 2003 12:18:23 -0800 (PST)
I have an application in gtk-1.2 (eXtace) which previously had used a
gtk_input() function to gather incoming data, at the end of each iteration of
that function it would modify some parts fo a drawing area, (updated a moving
marker to represent how much data arrived). Since converting this from a
gtk_input to a plain pthread (posix thread) doingthe same gui updates (wrapped,
inside gtk_threads_enter/leave() calls) it no longer updates the window of
interest when it is called. It WILL update when a seperate gtk_timeout_func()
runs, and updates at the rate of that timeout. The timeout is called to update
other drawing areas at a periodic rate, andhte input and timeouts are not
synchronous (they are independant) Previously when NOT using the pthread, the
input funciton would update the window INDEPENTANTLY of the timeout function,
Now with the pthread the behavior calls to update the smaller drawing area (in
the input function) now ony update the screen when the main timeout gets
called...
The gui calls in both the pthread input function and the gtk_input function are
identical, with the exception that the pthread ones are wrapped in
gtk_threads_enter/leave, since it runs outside of the main gtk loop.
Any ideas??
=====
Dave J. Andruczyk
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]