[cairo] redraw, who (xlib/cairo), when...

First Last begre1929 at yahoo.com
Sun May 26 16:20:31 PDT 2013


Hi Glynn,
first thanks. 

>You should redraw the window (or at least the rectangle specified in
>the XExposeEvent structure) in response to an Expose event. Ideally,
>you should collect any pending Expose events and perform the minimum
>amount of work necessary to redraw the specified rectangles (i.e. if
>there are multiple pending Expose events covering the entire window,
>you should only redraw it once, not once per event).
ok I'll take care of that, for now I flush the display because it's fast to code.

>Your main loop calls XNextEvent(), which will block until an event is
>available. If there are no events to report, it will block
>indefinitely.
I suspected that, but when I did a test (writting a char in a file every time the main loop started a new loop) I detected some loops completed, without interacting by myself. Now I think I will first write a loop which will be more chatty...>Beyond that, I suggest looking at the source code for the main loop of
>an existing GUI toolkit for clues as to how to implement input, timer
>and/or idle events.
I already do this, I'm looking in twm and jwm, I use two books also and I bother people like you, I need to have different sources in the aim to understand, since almost everything isn't in my mothertongue.

so now, about the rest of your email, I won't say everything is clear and obvious just by reading it, but you gave me enough information to lead my searches.

-Nicoo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130526/c79399b6/attachment.html>


More information about the cairo mailing list