Re: [osg-users] osgViewer::GraphicsWindowWin32 cursor issue

2010-04-21 Thread Torben Dannhauer
Hi Mikhail,

showing what code causes trouble implies the same efford for applying patch 
etc. as reviewing for merge, so also for that purposes it would be great to 
follow the submission protocol.

If you have additionally modified your file containing some private code lines 
you don't want to disclose, I could understand your aproach.


Thank you!

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27063#27063





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgViewer::GraphicsWindowWin32 cursor issue

2010-04-21 Thread Mikhail I. Izmestev
> Please provide full modified files, if you wish also provide the patch
> files as well as this sometimes can help a quick look but I don't use
> them for final merge as they just don't cut it.

Hello Robert.

I sent a patch not for final merge, just to show which part of code
causes problem.

Mikhail.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgViewer::GraphicsWindowWin32 cursor issue

2010-04-21 Thread Robert Osfield
Hi Mikhail,

On Wed, Apr 21, 2010 at 9:13 AM, Mikhail I. Izmestev
 wrote:

> I don't see any reason of posting whole modified file. You can use patch:
> $ cd src/osgViewer/
> $ patch -p0 < ~/gw.patch

I know how to apply I patch, but it's just not reliable enough,
patches fail and when they do you have to go back to original author
and ask for the files.  Patches also cause me more work as I can to
create a full modified file and then do a graphical diff against the
original file so I can do a proper review.

Over the last decade of developing the OSG I have found the most
reliable way to merge changes is to it graphically from full source
files, the policy of requiring full files hasn't just popped out of
the air to make you life more awkward - it's there to make sure the
quality of the OSG remains high and that the process is efficient.

Please provide full modified files, if you wish also provide the patch
files as well as this sometimes can help a quick look but I don't use
them for final merge as they just don't cut it.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgViewer::GraphicsWindowWin32 cursor issue

2010-04-21 Thread Mikhail I. Izmestev
> Hi Mikail,
>
> Could you please post the whole modified file, as per the other
> requests and the detailed on the SubmissionsProtocol page.
>
>
> http://www.openscenegraph.org/projects/osg/wiki/MailingLists/SubmissionsProtocol
>
> Thanks,
> Robert.
>

Hello Robert.

I don't see any reason of posting whole modified file. You can use patch:
$ cd src/osgViewer/
$ patch -p0 < ~/gw.patch

For windows users patch program can be downloaded from:
http://gnuwin32.sourceforge.net/packages/patch.htm

Mikhail.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgViewer::GraphicsWindowWin32 cursor issue

2010-04-20 Thread Robert Osfield
Hi Mikail,

Could you please post the whole modified file, as per the other
requests and the detailed on the SubmissionsProtocol page.

   
http://www.openscenegraph.org/projects/osg/wiki/MailingLists/SubmissionsProtocol

Thanks,
Robert.

On Sun, Mar 28, 2010 at 8:12 PM, Mikhail I. Izmestev
 wrote:
> Hello.
>
> Attached patch can solve those problems.
>
> Mikhail.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgViewer::GraphicsWindowWin32 cursor issue

2010-03-28 Thread Torben Dannhauer
Hi Mikhail,

please send the full file, patches are not welcome in OSG :)

Thank you!

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26241#26241





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgViewer::GraphicsWindowWin32 cursor issue

2010-03-28 Thread Mikhail I. Izmestev
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


[osg-users] osgViewer::GraphicsWindowWin32 cursor issue

2010-03-26 Thread Mikhail I. Izmestev
Hello.

I have discovered some problem using InheritCursor with
osgViewer::GraphicsWindowWin32 to make possible WM_SETCURSOR handling
in my application.

If _mouseCursor == InheritCursor then WM_SETCURSOR handler in
GraphicsWindowWin32::handleNativeWindowingEvent do nothing and
WM_SETCURSOR message sends to my application. I can set _mouseCursor
to InheritCursor by calling GraphicsWindowWin32::setCursor method, all
works fine, WM_SETCURSOR message received. But if I try to move mouse
around window border then _mouseCursor changes to another value and
never set back to InheritCursor. Problem into WM_NCHITTEST handler, it
never set _mouseCursor to InheritCursor.

Another problem with cursor into windows vista with composition
enabled. Windows vista not send WM_NCHITTEST message when mouse moved
into window caption and cursor stay as resizing. But we can use
WM_NCMOUSEMOVE message. Same problem discussed at
http://social.msdn.microsoft.com/Forums/en/windowsuidevelopment/thread/9a8a63c8-79b5-43a8-82eb-f659be947add

Mikhail.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org