Your pseudocode has pretty much nailed how I structure the main process loop for my games.
Of course we would add the user input collection and updates to the game state variables in between your Repeat and Render() statements.
And of course no forced Delay(16) but a hold based on a comparison to the loop timer variable.
I'm sure you inserted that Delay(16) just to emphasize the point about FPS, right?

What you implemented is a <60 FPS maximum.
luis, the real news for me is the NEED to empty the event queue before issuing the FlipBuffers in a window.
It's simply amazing to me that that vital information is not in the docs in the appropriate place and emphasized!
(I just realized it's probably not emphasized because it's probably not a problem in the other OSes.)
The other lesson learned in this thread is the use of the CanvasGadget, and the consistent (in UBUNTU 13) graphics results in Linux obtained with it.
So far I have not got around to checking out the AddKeyboardShortcut() function, but I will. Thanks for the direction.
I am wondering why you have mentioned, now twice, how to best program the screen updates?
It would be a mistake for you to extrapolate my programming style from a code snippet generated to demonstrate a bug.
However how else can I interpret your stress on how to program, and now you've even supplied a rudimentary game loop template?
Thanks I appreciate it, but believe me it was not even close to necessary.
But I do sincerely appreciate your intention.
I would consider updating deltas only if resources were a problem.
But nowadays with GHz processing combined with my tiny 800x600 screen size,
it's far easier to program the main loop to redraw everything each update based on the variables
than to try and keep track of what needs to be changed.
It used to be considered a waste and lazy, but now it makes sense.
These are real code execution bugs on my system, not caused by invalid event programming.
I'm not trying to switch topics because the following does not have to do with the event queue, but since you are not seeing the bugs
luis, my suspicions are shifting to the OS.
For sure the results (the first 800x600 of the desktop showing) as I've reported from running that
simple 10 liner in post #14 should demonstrate an incompatibility to anyone.
By this point I had hoped that another UBUNTU 13 user would have posted with some observations.
More and more I am thinking that the OS is the source of the graphics malfunctions.
That 10 line code example in post #14 which fails on my system should be a trivial place to start the compatibility checking.
Does it fail on anyone else's Linux?