aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java b/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java
index 38a5b5bc6..0cf813ad5 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java
@@ -59,10 +59,8 @@ public class GDIUtil implements ToolkitProperties {
if( !initIDs0() ) {
throw new NativeWindowException("GDI: Could not initialized native stub");
}
- dummyWindowClassFactory = new RegisteredClassFactory(dummyWindowClassNameBase, getDummyWndProc0());
- if(DEBUG) {
- System.out.println("GDI.initSingleton() dummyWindowClassFactory "+dummyWindowClassFactory);
- }
+ long a = getDummyWndProc0();
+ dummyWindowClassFactory = new RegisteredClassFactory(dummyWindowClassNameBase, a);
isInit = true;
}
}
@@ -94,11 +92,7 @@ public class GDIUtil implements ToolkitProperties {
public static long CreateDummyWindow(int x, int y, int width, int height) {
synchronized(dummyWindowSync) {
dummyWindowClass = dummyWindowClassFactory.getSharedClass();
- if(DEBUG) {
- System.out.println("GDI.CreateDummyWindow() dummyWindowClassFactory "+dummyWindowClassFactory);
- System.out.println("GDI.CreateDummyWindow() dummyWindowClass "+dummyWindowClass);
- }
- return CreateDummyWindow0(dummyWindowClass.getHInstance(), dummyWindowClass.getName(), dummyWindowClass.getName(), x, y, width, height);
+ return CreateDummyWindowAndMessageLoop(dummyWindowClass.getHInstance(), dummyWindowClass.getName(), dummyWindowClass.getName(), x, y, width, height);
}
}
@@ -108,7 +102,7 @@ public class GDIUtil implements ToolkitProperties {
if( null == dummyWindowClass ) {
throw new InternalError("GDI Error ("+dummyWindowClassFactory.getSharedRefCount()+"): SharedClass is null");
}
- res = GDI.DestroyWindow(hwnd);
+ res = SendCloseMessage(hwnd);
dummyWindowClassFactory.releaseSharedClass();
}
return res;
@@ -130,10 +124,13 @@ public class GDIUtil implements ToolkitProperties {
public static native boolean DestroyWindowClass(long hInstance, String className);
private static native boolean initIDs0();
- private static native long getDummyWndProc0();
+ static native long getDummyWndProc0();
private static native Object GetRelativeLocation0(long src_win, long dest_win, int src_x, int src_y);
private static native boolean IsChild0(long win);
private static native boolean IsUndecorated0(long win);
static native long CreateDummyWindow0(long hInstance, String className, String windowName, int x, int y, int width, int height);
+
+ static native long CreateDummyWindowAndMessageLoop(long hInstance, String className, String windowName, int x, int y, int width, int height);
+ static native boolean SendCloseMessage(long win);
}