Re: [glade--]threading problems, was: HELP ME!!!



MIGUELMMC wrote:
Hello.

I need help.

I am trying to paint images with create_from_xpm_data and
Gtk::Image::set..., but the window is not refreshing (like
Update_Data(true or false) in MS-Windows) under these circumstances:

If //pixmap1->set(brkpt) window refreshes good.
If pixmap1->set(brkpt):
     If usleep(x) -> x is > 500000 more or less: good
     If usleep(x) -> x is < 500000 or another value small: Freezed!

What is wrong?

to be honest: I don't have the slightest idea. This is the first multi threaded gtkmm program I came across. Looks like the infrastructure is there at last ...

My guess: The glib main loop detects whether your process creates new paint requests every N microseconds. If it still does, the redraw is held. Perhaps something around "while event_pending do process_event" is needed regularly in your work thread. Try to ask on the gtkmm list or the gtk/glib list, this problem is not C++ specific.

And please: tell me if you know what the problem was.

Thanks in advance.

Here is the code:
(sorry, a lot of lines :( )
>

no problem for me. If you had zipped and attached it, it'd have been more difficult for me to read it (one more step) ... I'm ambigious about attachments vs. inline.

   Christof





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