Hello.

Attached patch can solve those problems.

Mikhail.
Index: GraphicsWindowWin32.cpp
===================================================================
--- GraphicsWindowWin32.cpp     (revision 11300)
+++ GraphicsWindowWin32.cpp     (working copy)
@@ -2465,11 +2465,18 @@
             break;
 
         ///////////////////
-        case WM_NCHITTEST :
+        case WM_NCMOUSEMOVE :
+        case WM_NCHITTEST   :
         ///////////////////
             {
-                LONG_PTR result = _windowProcedure==0 ? ::DefWindowProc(hwnd, 
uMsg, wParam, lParam) :
-                                                        
::CallWindowProc(_windowProcedure, hwnd, uMsg, wParam, lParam);
+                // WM_NCMOUSEMOVE needed because windows vista not send 
WM_NCHITTEST message correct
+                // you can see that with spy++
+                LONG_PTR result;
+                if(uMsg == WM_NCHITTEST)
+                    result = _windowProcedure==0 ? ::DefWindowProc(hwnd, uMsg, 
wParam, lParam) :
+                                                   
::CallWindowProc(_windowProcedure, hwnd, uMsg, wParam, lParam);
+                else
+                    result = wParam;
 
                 switch(result)
                 {
@@ -2504,11 +2511,14 @@
                    break;
 
                 default:
-                    if (_traits->useCursor && _appMouseCursor != InheritCursor)
+                    //we must call setCursorImpl(InheritCursor) to set back
+                    //_mouseCursor = InheritCursor which needed to correct 
WM_SETCURSOR handling
+                    if (_traits->useCursor/* && _appMouseCursor != 
InheritCursor*/)
                         setCursorImpl(_appMouseCursor);
                     break;
                 }
-                return result;
+                if(uMsg == WM_NCHITTEST)
+                    return result;
             }
             break;
 
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to