Hi Stephan,

I have just merged and checked in your fix.

Your proposal for wider improvements to the cursor codes in osgViewer
sound reasonable but removing useCursor is not something we should do
just before a release, and I'm hestitent to do wide changes right now
- feature freeze is at the end of this week. Right now I have no
appetitte for trying to squeeze ever possible change in before Friday
so am looking for low risk changes, we only have two weeks before 3.0
goes out.

Cheers,
Robert.

On Fri, Jun 10, 2011 at 1:38 PM, Stephan Maximilian Huber
<[email protected]> wrote:
> Hi Robert,
>
> attached you'll find a fix for the non-working useCursor()-method for
> Windows. With the old code you can switch off the cursor, but not back on.
>
> This is a quick fix, as I am on a deadline.
>
> Regarding useCursor/MouseCursor
>
> I think we should refactor the whole useCursor/setCursor methods,
> there's lot of repeated code in the various implementations, by reading
> the existing code I think that the x11-implementation of useCursor will
> not work as expected, the cocoa-implementation is too clunky, and the
> win-implementation is faulty (which gets fixed hopefully with my
> submission)
>
> Here is my proposal:
>
> * GraphicsContext::Traits should become a mouseCursor-member, remove the
> useCursor-member
> * remove virtual from GraphicsWindow::useCursor and change the
> implementation of GraphicsWindow::useCursor for all implementations:
> setCursor(useCursor ? _traits->mouseCursor : NoCursor);
> * rename setCursor to setCursorImplementation, this will be implemented
> by the various subclasses
> * add a new method setCursor which stores the cursor in the traits, and
> call setCursorImplementation if the new cursor is different from the
> already stored one and is not InheritCursor.
> * add a getCursor-method (not required, as you can get the current
> cursor from the traits)
>
> this will hopefully reduce the code and make it cleaner, and it should
> work for every platform consistent and as expected.
>
> What do you think? I can start coding this, but first I have to finish
> my project.
>
> cheers,
> Stephan
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to