We created a class to do this optionally over Libgdx named
FocusableLwjglApplicationListener:

https://github.com/gemserk/commons-gdx/blob/master/commons-gdx-desktop/src/main/java/com/gemserk/commons/lwjgl/FocusableLwjglApplicationDelegate.java

The idea of this class is the same but doesn't modify current behavior, I
prefer that in some way.

On Wed, Mar 13, 2013 at 3:01 PM, Pat <notifications@github.com> wrote:

> In
> backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplication.java:
>
> >  		while (running) {
> >  			Display.processMessages();
> >  			if (Display.isCloseRequested()) {
> >  				exit();
> >  			}
> > -
> > +			
> > +			if (graphics.config.pauseWhenMinimized) {
> > +				if (!wasPaused && !Display.isActive()) {
>
> I think you should cache the value of Display.isActive() in a local
> variable here. The behavior might get weird if the status changes as this
> code is executing.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/libgdx/libgdx/pull/294/files#r3359793>
> .
>



-- 

Gemserk Studios <http://blog.gemserk.com>