Hi Robert, may I kindly remind you this submission, just in case you forgot ? A feedback would be appreciated.
I also suggested a simple fix for 2.8 branch that doesn't involve an interface change. Thank you -Fred Frederic Bouvier a écrit : > Robert, > > I've just tested Mark's suggestion and it works perfectly, even when the > cursor goes to the border then come back inside the window. > But his patch doesn't seem to be based on the last revision of the > files, or at least not on the trunk, and there are more changes than > expected in them, including some loss from the previous patches. > The patch attached is based on r10068 of > src/osgViewer/GraphicsWindowWin32.cpp and r10067 of > include/osgViewer/api/Win32/GraphicsWindowWin32 > > I understand your point with the 2.8 branch. It doesn't seem possible to > avoid the extra function member. > > Regards, > -Fred > > Robert Osfield a écrit : > >> Hi Guys, >> >> Thanks to Mark for suggested fix. Could you all test Mark's change, >> and Fred could you integrate your changes with the ones from Mark and >> see if things can be made to work for you. >> >> FYI, it's my intention to keep 2.8.1 binary compatible with 2.8.0. So >> far that has been possible, and don't want to merge changes that would >> be break this. If we have a crash or similar major problem then I may >> reconsider, but for other less series problems I feel it's >> inappropriate to break the compatibility. The suggest of adding extra >> methods would break binary compatibility so would mean that these >> changes would be more appropriate for the 2.9.x series. >> >> Cheers, >> Robert. >> >> On Sat, Apr 25, 2009 at 9:18 AM, Frederic Bouvier <[email protected]> wrote: >> >> >>> Hi Mark and Robert, >>> >>> The default case bug was the other change I submitted. But I totally >>> missed the point that the original author use setCursor to set the >>> pointer for resizing, thus overwrite _appMouseCursor. >>> So the use of a setCursorImpl function that doesn't affect >>> _appMouseCursor is the right thing to do. >>> >>> Thank you Mark >>> >>> -Fred >>> >>> Mark Sciabica a écrit : >>> >>> >>>> Hi Robert, >>>> >>>> A look at the declaration of _appMouseCursor gives us a hint as to the >>>> original purpose of this code: >>>> >>>> /// Persist which mouse cursor was used before switching to the >>>> resize cursors. >>>> MouseCursor _appMouseCursor; >>>> >>>> However, the code is not currently functioning as intended by the >>>> comment. In order to get it working that way, the WM_NCHITTEST message >>>> handler needs to change its handling of the "default:" switch case to >>>> use _appMouseCursor instead of LeftArrowCursor. >>>> >>>> default: >>>> if (_traits->useCursor && _appMouseCursor != InheritCursor) >>>> setCursor(_appMouseCursor); >>>> break; >>>> >>>> This will enable the code to remember the cursor set by the user and >>>> temporarily use the sizing cursors when appropriate. (Instead of >>>> forcing use of the LeftArrowCursor.) However, it still has the problem >>>> that the user can't manually use the sizing cursors correctly since >>>> they are never assigned to _appMouseCursor. >>>> >>>> A complete fix would also create a private version of setCursor that >>>> does not set _appMouseCursor while the public version sets >>>> _appMouseCursor and calls the private version. The WM_NCHITTEST >>>> handler would use the private version. I attached files implementing >>>> this proposed solution. >>>> >>>> Regards, >>>> >>>> Mark >>>> >>>> Robert Osfield wrote: >>>> >>>> >>>>> Hi Frederic + Windows users (Paul Martz/J.S?) >>>>> >>>>> I'm not familiar with the GraphicsWindowWin32.cpp, as I don't use >>>>> Windows nor been involved in writing the GraphicsWindowWin32.cpp so I >>>>> have to defer entirely to Windows volunteers to write and maintain >>>>> this particular chunk of code. >>>>> >>>>> I quite simply don't understand the motivation by the original codes >>>>> that do something different for the LeftRightCursor etc in >>>>> GraphicsWindowWin32:setCursor. Since I don't understand why it's >>>>> there I cannot make a judgement call on whether it's appropriate to >>>>> remove it. If I do merge your change then there is a good chance that >>>>> it'll fix things for you but breaks things for others. There *must* >>>>> have been a reason that the code is there. >>>>> >>>>> Could I have some feedback from Win32 expects about the following bit >>>>> of code that Frederic has replaced in >>>>> GraphicsWindowWin32::setCursor(). >>>>> >>>>> Original: >>>>> >>>>> In file >>>>> "/home/robert/OpenSceneGraph/src/osgViewer//GraphicsWindowWin32.cpp": >>>>> ------------------------------ >>>>> 1945: if (mouseCursor != LeftRightCursor && >>>>> 1946: mouseCursor != UpDownCursor && >>>>> 1947: mouseCursor != TopLeftCorner && >>>>> 1948: mouseCursor != TopRightCorner && >>>>> 1949: mouseCursor != BottomLeftCorner && >>>>> 1950: mouseCursor != BottomRightCorner) >>>>> 1951: { >>>>> 1952: _appMouseCursor = mouseCursor; >>>>> 1953: } >>>>> 1954: >>>>> >>>>> Fredric's version >>>>> >>>>> In file "GraphicsWindowWin32.cpp": >>>>> ------------------------------ >>>>> 1945: _appMouseCursor = mouseCursor; >>>>> >>>>> >>>>> Thanks for your insights, >>>>> Robert. >>>>> >>>>> >>>>> >>>>> On Thu, Apr 23, 2009 at 8:08 PM, Frederic Bouvier <[email protected]> >>>>> wrote: >>>>> >>>>> >>>>> >>>>>> Hi Robert, >>>>>> >>>>>> the patch attached, made from r10068, fix two things, in other of >>>>>> importance : >>>>>> >>>>>> - the selected cursor is never shown ( second change in file ). Only the >>>>>> left arrow is always displayed. >>>>>> - remove the arbitrary ( in my sense ) limitation that the user cannot >>>>>> choose a cursor with the same shape that one used when resizing the >>>>>> window. This limitation doesn't exist for X11, and we have a diverging >>>>>> behaviour there ( first change in file ). Flightgear use the >>>>>> LeftRightCursor in look around mode. >>>>>> >>>>>> Thank you very much >>>>>> >>>>>> Regards, >>>>>> -Fred >>>>>> Flightgear developer >>>>>> -- Frédéric Bouvier http://my.fotolia.com/frfoto/ Photo gallery http://fgsd.sourceforge.net/ FlightGear Scenery Designer _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
