@Override
            public void invoke(long window, boolean focused) {
                if (wasActive != focused) {
                    if (wasActive == false) {
                        listener.gainFocus();
                        timer.reset();
                        wasActive = true;
                    } else {
                        listener.loseFocus();
                        wasActive = false;
                    }
                }
            }
Apply the settings, changing resolution, etc.

@param settings the settings to apply when creating the context.
jme3-vr/src/main/java/com/jme3/system/lwjgl/LwjglWindowVR.java