Canvas App pausing when canvas is invisible

Hello all,

is it possible that my canvas application continues to run in the background while the canvas is invisible? The setPausOnLostFocus() methos of Application does not help, because the run() method resides in the LwjglAbstractDisplay class which calls the runLoop() method in LwjglCanvas. There one can find the passage

[java]synchronized (reinitAuthLock){

while (!reinitAuth.get()){

try {


if (Thread.interrupted())

throw new InterruptedException();

} catch (InterruptedException ex) {

if (needClose.get()){

logger.log(Level.INFO, “OGL: Re-init aborted. Closing display…”);



logger.log(Level.SEVERE, "OGL: Interrupted! ", ex);



// NOTE: reinitAuth becamse true, now set it to false.



which waits for the canvas to be visible again (at least that’s what I think). But all the time, Application’s update() will not be called. Was this intended? Can this be fixed? Or am I too stupid and there is a simple solution to this?



P.S.: The application pauses, if the program calls setVisible(false) or setIcon(true) on the Canvas’ parent (in this case a JInternalFrame)

Yeah, lwjgl cannot keep the context open on a non-visible canvas. @Momoko_Fan has been working on a fix that uses a temporary buffer for the context but its not really an ideal solution. All this is only true for the AWT/Swing canvas.

thanks for the fast reply!