Re: [gtkmm] flush
- From: nwerneck cefala org
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] flush
- Date: Tue, 20 Apr 2004 09:47:11 -0300
It worked horrorshow!! Silly me, It took sometime before I see what
``the GUI thread'' mean. The code even looks more organized using
dispatchers!... It wasn't necessary to use any of these queue and
invalidate functions.
thanks!
On 200404, 11:46, Tor Arvid Lund wrote:
> I think you need to call queue_draw() on the StatusBar widget, and then
> if you want to force a repaint, you need to do:
>
> while(Gtk::Main::events_pending()) Gtk::Main::iteration();
>
> The important thing here, is that the GUI thread needs to do this, or
> else everything gets messed up. A solution is to let the other threads
> emit a signal when something needs repainting, and let the GUI thread
> listen on that signal, and call the above while loop. A normal signal
> won't work across threads, so I use a Glib::Dispatcher, which let you
> pipe signals across threads.
>
> Hope this helps.
--
Nicolau Werneck <nwerneck cefala org> 9F99 25AB E47E 8724 2F71
http://cefala.org/~nwerneck EA40 DC23 42CE 6B76 B07F
"The great tragedy of science -- the slaying of a beautiful hypothesis by an ugly fact. "
-- Thomas Huxley
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]