[producer-users] Minor SetCursor change

Don Burns don at andesengineering.com
Mon Jan 29 10:29:26 PST 2007


Hi Brad,

Your changes are submitted. Thank you.

-don

On 1/24/07, Bradford, Chase <CHASE.BRADFORD at saic.com> wrote:
>
>  Could you add an extra method to RenderSurface to allow cursor changing
> from an external thread?  When setCursor is call In Win32 application, the
> cursor isn't immediately changed.  I doubt this is a problem for X11, so the
> extra method could be simply call the existing setCursor.  However, in
> windows, the SetCursor(HCURSOR) command needs to happen in the thread owning
> the WndProc, or else it might be ignored until the next cursor update (from
> mouse movement, or changing window focus).
>
>
>
> At the bottom of this article is a discussion explaining what is
> happening.
>
> http://www.microsoft.com/msj/0397/Win32/Win320397.aspx
>
>
>
> Thanks,
>
> Chase
>
>
>
>
>
>
>
> To make it work on our system, I made the following changes to Producer
> ::RenderSurface.
>
>
>
> Add public method changeCursor(Cursor) and private method
> _changeCursor(Cursor) to Producer::RenderSurface.
>
>
>
> in RenderSurface.cpp:
>
> void RenderSurface::changeCursor(Cursor cursor){ _changeCursor(cursor); }
>
>
>
> in RenderSurface_Win32:
>
> void RenderSurface::_changeCursor(Cursor cursor)
>
> {
>
>     _currentCursor = cursor ? cursor : _nullCursor;
>
>     SendMessage( _win, WM_SETCURSOR, (WPARAM)_win, MAKELPARAM(HTCLIENT,0)
> );
>
> }
>
>
>
> in RenderSurface_X11.cpp
>
> void RenderSurface::_changeCursor(Cursor cursor){ _setCursor(Cursor); }
>
> _______________________________________________
> producer-users mailing list
> producer-users at openscenegraph.net
> http://openscenegraph.net/mailman/listinfo/producer-users
> http://www.andesengineering.com/Producer/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openscenegraph.net/pipermail/producer-users/attachments/20070129/54bfc9e9/attachment.html


More information about the producer-users mailing list