From 018c7e8660dc0af68bd129be9af5094d04d0b431 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Wed, 6 Oct 2010 16:04:06 +0200
Subject: NativeWindow/NativeSurface Refactoring ; Added mouseClick NEWT/AWT
 unit test

NativeWindow/NativeSurface Refactoring
    - Using NativeSurface interface
    - NativeWindow extends NativeSurface, adds getLocationOnScreen(Point)
    - NativeWindow add: getParent()
    - NativeWindow/Surface: Removed 'invalidate()', use 'destroy()' if you must.
    - NullWindow -> ProxySurface impl NativeSurface
    - JOGL: Uses NativeSurface only.
        - GLDrawable.getNativeWindow() -> GLDrawable.getNativeSurface()

Added mouseClick NEWT/AWT unit test

JOGL:
    - GLAnimatorControl add: resetCounter()
    -

NEWT:
    - GLWindow counters: return GLWindow counters always
    - WindowImpl
        - requestFocus() wait until done
        - reparent: readded requestFocusImpl(true),
                    native impl skips java focusAction if reparented
    - X11Window: Add XRaiseWindow() in requestFocus()
---
 src/newt/native/WindowsWindow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/newt/native/WindowsWindow.c')

diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c
index 4bf2545ab..e1250811c 100644
--- a/src/newt/native/WindowsWindow.c
+++ b/src/newt/native/WindowsWindow.c
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2010 JogAmp Community. All rights reserved.
  * 
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -606,7 +607,7 @@ static void NewtWindows_requestFocus (JNIEnv *env, jobject window, HWND hwnd, BO
     DBG_PRINT("*** WindowsWindow: requestFocus.S parent %p, window %p, isCurrent %d, reparented %d\n", 
         (void*) pHwnd, (void*)hwnd, current==hwnd, (int) reparented);
     if(reparented || current!=hwnd) {
-        if( JNI_FALSE == (*env)->CallBooleanMethod(env, window, focusActionID) ) {
+        if( reparented || JNI_FALSE == (*env)->CallBooleanMethod(env, window, focusActionID) ) {
             UINT flags = SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE;
             if(reparented) {
                 flags |= SWP_FRAMECHANGED;
-- 
cgit v1.2.3