Handle windowevents in engine.c. This should lower the CPU usage when openomf is on the background.