diff options
author | Sven Gothel <[email protected]> | 2012-04-16 21:01:26 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-04-16 21:01:26 +0200 |
commit | c4597b3a80f9fcbf89640bb007bc9004c361b6c7 (patch) | |
tree | 73d499b709b8b93803a2d30d4e31d4fdb1e31139 /src | |
parent | d989b90de1200642fe3508f6a4cd623aa0ba13c9 (diff) |
NEWT WindowImpl: Ensure screenChange suspense animation, even w/o having the notify method being called.
This happens on android, where we just react on an already happened screen rotate.
W/o animation suspend GL rendering could be disturbed or the thread could starve.
Diffstat (limited to 'src')
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index 1ef665571..f82f4b7d4 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -1853,6 +1853,10 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } if(success) { + if(!animatorPaused && null!=lifecycleHook) { + // Didn't pass above notify method. probably detected screen change after it happened. + animatorPaused = lifecycleHook.pauseRenderingAction(); + } DimensionImmutable screenSize = sm.getMonitorMode().getSurfaceSize().getResolution(); if ( getHeight() > screenSize.getHeight() || getWidth() > screenSize.getWidth() ) { |