Results 1 to 2 of 2
I am trying to enchance event handling loop. Right now with a standard (text book) loop the problem is that on any ConfigureNotify or Expose event I had to run ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-21-2006 #1
- Join Date
- Jun 2006
I am trying to enchance event handling loop. Right now with a standard (text book) loop the problem is that on any ConfigureNotify or Expose event I had to run drawing function which takes too long to complete. As a result, e.g., when I resize the window it will draw one by one all the intermediate sizes up to the final one. (Again since the draw function is slow it may take up to several seconds) Can I somehow discard all the intermediate ConfigureNotify and Expose events and process only the final one? I am trying to do that but so far wthout success.
- 06-21-2006 #2
I had a similar problem when writing my own app, and here's some solutions I came up with:
1) Expose events have a count member; ignore all Expose events with a count higher than 0. (This was my temporary solution)
2) Expose events have members to specify the region of the window that needs to be redrawn; redraw only this part. (This is part of the solution I used)
3) Draw to back buffers (like Pixmaps or in my case, Imlib_Images) whenever needed (for me it was when the root pixmap changed) and render the buffer onto the window when needed (Expose event)Flies of a particular kind, i.e. time-flies, are fond of an arrow.
Registered Linux User #408794