diff options
author | Sven Gothel <[email protected]> | 2020-01-16 12:17:35 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-01-16 12:17:35 +0100 |
commit | a1bc7ebb1b66f445a5134e4ed4b6ff6118291c51 (patch) | |
tree | 4f5651c197518b20e70c4c2e4bafa27c52a42c33 /src/newt | |
parent | f63b94cccc71cf154a7a6d3359ceface3a683229 (diff) |
NEWT: Enhance FullScreen.run DEBUG output a bit; NEWTDemoListener ignore input if not visible.
Diffstat (limited to 'src/newt')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java | 4 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java b/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java index ee6b59fc0..7507e772f 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java +++ b/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java @@ -117,6 +117,10 @@ public class NEWTDemoListener extends WindowAdapter implements KeyListener, Mous if( e.isAutoRepeat() || e.isConsumed() ) { return; } + if( !glWindow.isVisible() ) { + printlnState("[key "+e+" but invisible]"); + return; + } final int keySymbol = e.getKeySymbol(); switch(keySymbol) { case KeyEvent.VK_SPACE: diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index c92327912..176a33669 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -3099,7 +3099,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer final boolean tempInvisible = !_fullscreen && wasVisible && NativeWindowFactory.TYPE_X11 == NativeWindowFactory.getNativeWindowType(true); if(DEBUG_IMPLEMENTATION) { - System.err.println("Window "+x+"/"+y+" "+w+"x"+h+ + System.err.println("FullScreen.run.0: Window "+x+"/"+y+" "+w+"x"+h+ ", virtl-screenSize: "+sviewport+" [wu], monitorsViewport "+viewport+" [wu]"+ ", wasVisible "+wasVisible+", tempInvisible "+tempInvisible+ ", hasParent "+(null!=parentWindow)+ @@ -3191,7 +3191,11 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer display.dispatchMessagesNative(); // status up2date } if(DEBUG_IMPLEMENTATION) { - System.err.println("Window fs done: ok " + ok + ", " + WindowImpl.this); + System.err.println("FullScreen.run.X1: wasVisible, ok "+ok+", Window " + WindowImpl.this); + } + } else { + if(DEBUG_IMPLEMENTATION) { + System.err.println("FullScreen.run.X2: !wasVisible, Window " + WindowImpl.this); } } } finally { |