Re: Mixing immediate drawing with drawing via expose events

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

 



2009/1/31 Douwe Vos <dmvos2000@xxxxxxxxx>:
> 1. all the immediate drawing is done as a result of a key- or mouse-event (so no extra thread). Isn't the event-dispatcher for the key- and mouse-event handled by the same thread as the expose-event dispatcher (or even they are the same event-dispatcher?). So if that is the case then am I not running a single threaded program and therefore the immediate drawing should not interfere with the expose event drawing?

That's true, but not helpful :( the problem is that the order of event
dispatch can vary. If it's taking you a coupe of events to do you
immediiate drawing (eg. you want to be able to spot mouse down and
mouse up), you can't be sure there won't be an intervening expose
event. Or what if your view scrolls between your immediate mode draw
and the following expose?

I struggled with this for a while. You can mix immediate mode and
expose drawing in a simple application but once you have a more
complex mix of stuff it's just impossible to get it working reliably.
The final straw for me was when I needed to add drag scrolling (drag
an element to the edge of the window and the view scrolls). It was
just impossible to get it working correctly.

I switched to expose-only drawing and everything worked and my code
was smaller and simpler. It's really the only way to do a complex
view, in my opinion.

John
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux