summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/classes/com')
-rwxr-xr-xsrc/newt/classes/com/jogamp/newt/Window.java13
-rwxr-xr-xsrc/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java22
-rwxr-xr-xsrc/newt/classes/com/jogamp/newt/impl/x11/X11Window.java30
3 files changed, 32 insertions, 33 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java
index 653d76522..e807ad6af 100755
--- a/src/newt/classes/com/jogamp/newt/Window.java
+++ b/src/newt/classes/com/jogamp/newt/Window.java
@@ -507,22 +507,31 @@ public abstract class Window implements NativeWindow
}
public abstract void setVisible(boolean visible);
+
/**
* Sets the size of the client area of the window, excluding decorations
* Total size of the window will be
- * {@code width+insets.left+insets.right, height+insets.top+insets.bottom}
+ * {@code width+insets.left+insets.right, height+insets.top+insets.bottom}<br>
+ *
+ * This call is ignored if in fullscreen mode.<br>
+ *
* @param width of the client area of the window
* @param height of the client area of the window
*/
public abstract void setSize(int width, int height);
+
/**
* Sets the location of the top left corner of the window, including
* decorations (so the client area will be placed at
- * {@code x+insets.left,y+insets.top}.
+ * {@code x+insets.left,y+insets.top}.<br>
+ *
+ * This call is ignored if in fullscreen mode.<br>
+ *
* @param x coord of the top left corner
* @param y coord of the top left corner
*/
public abstract void setPosition(int x, int y);
+
public abstract boolean setFullscreen(boolean fullscreen);
//
diff --git a/src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java b/src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java
index ce1a0ad2e..bec7bfed2 100755
--- a/src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java
+++ b/src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java
@@ -159,13 +159,13 @@ public class WindowsWindow extends Window {
public void setSize(int width, int height) {
if (width != this.width || this.height != height) {
if(!fullscreen) {
+ this.width=width;
+ this.height=height;
nfs_width=width;
nfs_height=height;
- }
- this.width = width;
- this.height = height;
- if(0!=windowHandle && !fullscreen) {
- setSize0(parentWindowHandle, windowHandle, x, y, width, height);
+ if(0!=windowHandle) {
+ setSize0(parentWindowHandle, windowHandle, x, y, width, height);
+ }
}
}
}
@@ -174,13 +174,13 @@ public class WindowsWindow extends Window {
public void setPosition(int x, int y) {
if ( this.x != x || this.y != y ) {
if(!fullscreen) {
+ this.x=x;
+ this.y=y;
nfs_x=x;
nfs_y=y;
- }
- this.x = x;
- this.y = y;
- if(0!=windowHandle && !fullscreen) {
- setPosition(parentWindowHandle, windowHandle, x , y);
+ if(0!=windowHandle) {
+ setPosition0(parentWindowHandle, windowHandle, x , y /*, width, height*/);
+ }
}
}
}
@@ -245,7 +245,7 @@ public class WindowsWindow extends Window {
private native long MonitorFromWindow(long windowHandle);
private static native void setVisible0(long windowHandle, boolean visible);
private native void setSize0(long parentWindowHandle, long windowHandle, int x, int y, int width, int height);
- private native void setPosition(long parentWindowHandle, long windowHandle, int x, int y);
+ private static native void setPosition0(long parentWindowHandle, long windowHandle, int x, int y /*, int width, int height*/);
private native void setFullscreen0(long parentWindowHandle, long windowHandle, int x, int y, int width, int height, boolean isUndecorated, boolean on);
private static native void setTitle(long windowHandle, String title);
private static native void requestFocus(long windowHandle);
diff --git a/src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java b/src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java
index cd089ccfb..2fa41c62a 100755
--- a/src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java
+++ b/src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java
@@ -95,39 +95,29 @@ public class X11Window extends Window {
}
public void setSize(int width, int height) {
- if(DEBUG_IMPLEMENTATION) {
- System.err.println("X11Window setSize: "+this.x+"/"+this.y+" "+this.width+"x"+this.height+" -> "+width+"x"+height);
- // Exception e = new Exception("XXXXXXXXXX");
- // e.printStackTrace();
- }
if (width != this.width || this.height != height) {
- this.width = width;
- this.height = height;
if(!fullscreen) {
+ this.width = width;
+ this.height = height;
nfs_width=width;
nfs_height=height;
- }
- if(0!=windowHandle && !fullscreen) {
- setSize0(getDisplayHandle(), windowHandle, width, height);
+ if(0!=windowHandle) {
+ setSize0(getDisplayHandle(), windowHandle, width, height);
+ }
}
}
}
public void setPosition(int x, int y) {
- if(DEBUG_IMPLEMENTATION) {
- System.err.println("X11Window setPosition: "+this.x+"/"+this.y+" -> "+x+"/"+y);
- // Exception e = new Exception("XXXXXXXXXX");
- // e.printStackTrace();
- }
if ( this.x != x || this.y != y ) {
- this.x = x;
- this.y = y;
if(!fullscreen) {
+ this.x = x;
+ this.y = y;
nfs_x=x;
nfs_y=y;
- }
- if(0!=windowHandle && !fullscreen) {
- setPosition0(parentWindowHandle, getDisplayHandle(), windowHandle, x, y);
+ if(0!=windowHandle) {
+ setPosition0(parentWindowHandle, getDisplayHandle(), windowHandle, x, y);
+ }
}
}
}