Update label immediately



Hello list,

I'm a gtkmm newbie, I started serious programming with it just days ago and am now far off the 5 kLOC border and already have impressive results. However, there is something that I cannot seem to get done:

I'm writing an application which reads from a DMM (asynchronously, I'm using pthreads - is that a bad idea?) and displays the gathered data graphically in a Gtk::DrawingArea and also updates the last value to a Gtk::Label. Events come in around every half second. The problem is, the label is not getting updated instantly, as I'd wish. Only when the mouse is moved over it, it apperas.

The code that modifies the label is simple:

label->set_label("foobar result");

So now what I played around with was:

label->get_window->process_updates(false);

Which is getting me a nasty

Xlib: unexpected async reply (sequence 0x363)!

I'm guessing process_updates is not reentrant and I have to take care about that myself. But - how?

Thanks in advance,
Johannes


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