Re: Queue Draw does not always call expose signal



Hi Simon,

On Sat, 30 Apr 2011 18:37:34 +1000 you wrote:
> 
> The program is event driven, but has a thread running that processes the
> layout.

Have you read the recent (13th March) post from Chris Vine entitled
"Threads and gtkmm"? If not, dig it out and read it now.

> Every time one iteration of the layout algorithm in the layout
> thread has occured, I call 'queue_draw()' on the drawing area. The drawing
> area has the following definition:

The drawing area is owned by the main thread, and you're calling a
member function from another thread?

> Now, my issue is that when I call queue_draw() in my layout thread, it will
> continually send the expose_event signal, up until a point. Eventually
> (anywhere from 10-1000 queue_draw()'s), the my_expose_event() function will
> stop being called. I have other parts of my program, say, right clicking
> that will lead it to change the status bar text, if I call this, it
> (usually!) fixes it.

That does sound like the sort of behaviour I'd expect from a
thread-safety bug. Surely worth a check.

Cheers,
Rob


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