[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Waking Up a Pygame App



After my pygame application has been sitting idle for a few minutes, the first mouse click (or touch when using a touchscreen), doesn't get handled by the application. Instead it seems to wake the application up, and then another click or touch is necessary. So when I have a button, I need to click on it twice in order for it to recognize the click. I know that the application code is running however, as evidenced by the animations continuing according to the timers within my app.

Is there any way to ensure that the application stays "awake" listening for mouse events so that the first click will actually be handled? I've observed this behavior on Ubuntu, Maemo, and OS X. Python 2.5.1, Pygame 1.8.

Thanks in advance for any advice you have to offer.

Doug Petkanics