diff options
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/Window.java | 6 | ||||
-rw-r--r-- | src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java index 78e2abc6e..cc42465f1 100644 --- a/src/newt/classes/com/jogamp/newt/Window.java +++ b/src/newt/classes/com/jogamp/newt/Window.java @@ -129,7 +129,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol { * <pre> * if ( 0 == windowHandle && visible ) { * this.visible = visible; - * if( 0 < width*height ) { + * if( 0 < width && 0 < height ) { * createNative(); * } * } else if ( this.visible != visible ) { @@ -171,9 +171,9 @@ public interface Window extends NativeWindow, WindowClosingProtocol { * <p> * Zero size semantics are respected, see {@link #setVisible(boolean)}:<br> * <pre> - * if ( 0 != windowHandle && 0 ≥ width*height && visible ) { + * if ( visible && 0 != windowHandle && ( 0 ≥ width || 0 ≥ height ) ) { * setVisible(false); - * } else if ( 0 == windowHandle && 0 < width*height && visible ) { + * } else if ( visible && 0 == windowHandle && 0 < width && 0 < height ) { * setVisible(true); * } else { * // as expected .. diff --git a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java index 74611706a..525225804 100644 --- a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java +++ b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java @@ -157,7 +157,7 @@ public class NewtCanvasSWT extends Canvas implements WindowClosingProtocol { } updateSizeCheck(); final Rectangle nClientArea = clientArea; - if(0 == nClientArea.width * nClientArea.height) { + if(0 >= nClientArea.width || 0 >= nClientArea.height) { return false; } |