summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-09-15 05:43:29 +0200
committerSven Gothel <[email protected]>2011-09-15 05:43:29 +0200
commit0b753d75c36af7dd5bb0864f02b934a51991e658 (patch)
tree7e353240786a49e0f1f592d95bba74fe65774ab8 /src/newt/classes/jogamp
parent1b7844b9422472aa1c5089ed8c4918eb6ebcfd23 (diff)
NEWT X11/Windows: Fix AlwaysOnTop (startup and change)
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r--src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java8
-rw-r--r--src/newt/classes/jogamp/newt/driver/x11/X11Window.java17
2 files changed, 14 insertions, 11 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java
index 7dd67e62b..9c80f0f85 100644
--- a/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java
+++ b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java
@@ -104,8 +104,10 @@ public class WindowsWindow extends WindowImpl {
if (config == null) {
throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
}
+ final int flags = getReconfigureFlags(0, true) &
+ ( FLAG_IS_ALWAYSONTOP | FLAG_IS_UNDECORATED ) ;
setWindowHandle(CreateWindow0(display.getHInstance(), display.getWindowClassName(), display.getWindowClassName(),
- getParentWindowHandle(), 0, isUndecorated(), x, y, width, height));
+ getParentWindowHandle(), x, y, width, height, flags));
if (getWindowHandle() == 0) {
throw new NativeWindowException("Error creating window");
}
@@ -201,8 +203,8 @@ public class WindowsWindow extends WindowImpl {
protected static native long getNewtWndProc0();
private native long CreateWindow0(long hInstance, String wndClassName, String wndName,
- long parentWindowHandle, long visualID, boolean isUndecorated,
- int x, int y, int width, int height);
+ long parentWindowHandle,
+ int x, int y, int width, int height, int flags);
private native long MonitorFromWindow0(long windowHandle);
private native void reconfigureWindow0(long parentWindowHandle, long windowHandle,
int x, int y, int width, int height, int flags);
diff --git a/src/newt/classes/jogamp/newt/driver/x11/X11Window.java b/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
index 3c48ba4bf..08db72acd 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
@@ -66,16 +66,17 @@ public class X11Window extends WindowImpl {
throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
}
X11GraphicsConfiguration x11config = (X11GraphicsConfiguration) config;
- long visualID = x11config.getVisualID();
- long w = CreateWindow0(getParentWindowHandle(),
+ final long visualID = x11config.getVisualID();
+ final int flags = getReconfigureFlags(0, true) &
+ ( FLAG_IS_ALWAYSONTOP | FLAG_IS_UNDECORATED ) ;
+ setWindowHandle(CreateWindow0(getParentWindowHandle(),
display.getEDTHandle(), screen.getIndex(), visualID,
display.getJavaObjectAtom(), display.getWindowDeleteAtom(),
- x, y, width, height, isUndecorated());
- if (w == 0) {
- throw new NativeWindowException("Error creating window: "+w);
+ x, y, width, height, flags));
+ windowHandleClose = getWindowHandle();
+ if (0 == windowHandleClose) {
+ throw new NativeWindowException("Error creating window");
}
- setWindowHandle(w);
- windowHandleClose = w;
}
protected void closeNativeImpl() {
@@ -154,7 +155,7 @@ public class X11Window extends WindowImpl {
protected static native boolean initIDs0();
private native long CreateWindow0(long parentWindowHandle, long display, int screen_index,
long visualID, long javaObjectAtom, long windowDeleteAtom,
- int x, int y, int width, int height, boolean undecorated);
+ int x, int y, int width, int height, int flags);
private native void CloseWindow0(long display, long windowHandle, long javaObjectAtom, long windowDeleteAtom);
private native void reconfigureWindow0(long display, int screen_index, long parentWindowHandle, long windowHandle,
int x, int y, int width, int height, int flags);