[osg-users] mouse move problem
jean-sebastien.guay at cm-labs.com
Wed Sep 24 08:44:46 PDT 2008
> I added a pickhandler to vivewer,when something is picked ,I showed
> a dialog.The problem is when the dialog is closed,the osg scene moved
> with mouse move.I must click left mouse button to stop it.You
> know,normally when we move our mouse ,the osg scene will not move.So,how
> to fix this?
This is because when your dialog pops up, the focus changes to the
dialog, and the mouse button release message is never sent to the
graphics window. So when your mouse comes back to it, it still "thinks"
that the left mouse button is pressed.
I am having similar issues but have not yet investigated how to fix
them. I'm thinking it will be similar to a recent fix in
GraphicsWindowWin32 where the keyboard release messages weren't gotten
when focus changed. The solution there was to check the keys when focus
came back, so I would guess that we also need to check the mouse buttons
to make sure correct state is maintained.
If you want to look into it yourself, feel free to do so of course :-)
I'm not sure when I'll be able to get to it.
Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
More information about the osg-users