<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><span style="font-weight: bold;">Hi Glynn,</span><div class="y_msg_container"><span style="font-weight:bold;"></span><div id="yiv7311204776"><div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt;"><div><span style="font-weight:bold;">first thanks. <br></span></div><div style="color:rgb(0, 0, 0);font-size:16px;font-family:times new roman, new york, times, serif;background-color:transparent;font-style:normal;">>You should redraw the window (or at least the rectangle specified in<br>>the XExposeEvent structure) in response to an Expose event. Ideally,<br>>you should collect any pending Expose
 events and perform the minimum<br>>amount of work necessary to redraw the specified rectangles (i.e. if<br>>there are multiple pending Expose events covering the entire window,<br>>you should only redraw it once, not once per event).</div><div style="color:rgb(0, 0, 0);font-size:16px;font-family:times new roman, new york, times, serif;background-color:transparent;font-style:normal;"><span style="font-weight:bold;">ok I'll take care of that, for now I flush the display because it's fast to code.</span><br></div><div>>Your main loop calls XNextEvent(), which will block until an event is<br>>available. If there are no events to report, it will block<br>>indefinitely.</div><div style="color:rgb(0, 0, 0);font-size:16px;font-family:times new roman, new york, times, serif;background-color:transparent;font-style:normal;"><span style="font-weight:bold;">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...</span></div>>Beyond that, I suggest looking at the source code for the main loop of<br>>an existing GUI toolkit for clues as to how to implement input, timer<br>>and/or idle
 events.<br><span style="font-weight:bold;"><span id="yiv7311204776result_box" class="yiv7311204776short_text" lang="en"><span class="yiv7311204776hps">I</span> <span class="yiv7311204776hps">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 </span></span><span id="yiv7311204776result_box" class="yiv7311204776short_text" lang="en"><span class="yiv7311204776hps"><span id="yiv7311204776result_box" class="yiv7311204776short_text" lang="en"><span class="yiv7311204776hps">almost everything isn't in my mothertongue</span></span>.</span></span><br><br>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.</span><br><br><span style="font-weight:bold;">-Nicoo</span><br>  </div></div></div><br><br></div> </div> </div>  </div></body></html>