diff options
author | Sven Gothel <[email protected]> | 2012-01-16 13:16:31 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-01-16 13:16:31 +0100 |
commit | 10e77e2af4448c3404becdd2ce359a3f34a91f5c (patch) | |
tree | 74682aadecadd0b68cd6842b3d28058adf4419c9 /src | |
parent | 26368a0ab1dfd612f29488cd1087c679868f7fbf (diff) |
NEWT childWindow: No autoPosition, use 0/0 as default.
Diffstat (limited to 'src')
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index 6564857e4..6e7735509 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -93,7 +93,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer protected boolean fullscreen = false, hasFocus = false; protected int width = 128, height = 128; // client-area size w/o insets, default: may be overwritten by user protected int x = 64, y = 64; // client-area pos w/o insets - protected boolean autoPosition = true; // default: true (allow WM to choose if not set by user) + protected boolean autoPosition = true; // default: true (allow WM to choose top-level position, if not set by user) protected Insets insets = new Insets(); // insets of decoration (if top-level && decorated) protected int nfs_width, nfs_height, nfs_x, nfs_y; // non fullscreen client-area size/pos w/o insets @@ -277,9 +277,15 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer NativeSurface.LOCK_SURFACE_NOT_READY >= parentWindow.lockSurface() ) { throw new NativeWindowException("Parent surface lock: not ready: "+parentWindow); } - if( ( 0>x || 0>y ) && null != parentWindow ) { - // min. child window position is 0/0 - x = 0; y = 0; + if(null != parentWindow ) { + if( autoPosition ) { + // child position default to 0/0, no auto position + x = 0; y = 0; + autoPosition = false; + } else if( 0>x || 0>y ) { + // min. child window position is 0/0 + x = 0; y = 0; + } } try { if(validateParentWindowHandle()) { |