<div dir="ltr"><div>Hi Kris,</div><div><br></div><div>are you on windows? If so, you can force the Windows Manager to pass all events to the osgView. Here is some snippet:</div><div><br></div><div><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1814" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">osgViewer::CompositeViewer::Windows wins;</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1815" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> viewer-><span class="gmail-pl-c1">getWindows</span>(wins);</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1816" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
<br></td></tr><tr></tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1819" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"><span class="gmail-pl-k">while</span> (!viewer-><span class="gmail-pl-c1">done</span>())</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1820" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> {</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1821" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
<br></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1822" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">#<span class="gmail-pl-k">if</span> defined(_WIN32)</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1823" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> MSG msg;</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1824" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-k">if</span> (::<span class="gmail-pl-c1">PeekMessage</span>(&msg,<span class="gmail-pl-c1">NULL</span>,<span class="gmail-pl-c1">0</span>,<span class="gmail-pl-c1">0</span>,PM_NOREMOVE))</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1825" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> {</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1826" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-en">::GetMessage</span>(&msg, <span class="gmail-pl-c1">NULL</span>, <span class="gmail-pl-c1">0</span>, <span class="gmail-pl-c1">0</span>);</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1827" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
<br></td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1828" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-k">if</span> (wins.<span class="gmail-pl-c1">size</span>())</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1829" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> {</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1830" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> osgViewer::GraphicsHandleWin32 *hdl = <span class="gmail-pl-k">dynamic_cast</span><osgViewer::GraphicsHandleWin32*>(wins.<span class="gmail-pl-c1">at</span>(<span class="gmail-pl-c1">0</span>));</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1831" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-k">if</span>(hdl)</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1832" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> {</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1833" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> WNDPROC <span class="gmail-pl-smi">fWndProc</span> = (WNDPROC)::<span class="gmail-pl-c1">GetWindowLongPtr</span>(hdl-><span class="gmail-pl-c1">getHWND</span>(), GWLP_WNDPROC);</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1834" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-k">if</span> (<span class="gmail-pl-smi">fWndProc</span> && hdl-><span class="gmail-pl-c1">getHWND</span>())</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1835" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> {</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1836" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> <span class="gmail-pl-en">::CallWindowProc</span>(<span class="gmail-pl-smi">fWndProc</span>,hdl-><span class="gmail-pl-en">getHWND</span>(),msg.message, msg.wParam, msg.lParam);</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1837" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> }</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1838" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> }</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1839" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> }</td>
</tr>
<tr>
</tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC1840" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line"> }</td>
</tr>
<tr>
</tr></tbody></table>#endif</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 13, 2019 at 8:31 AM Kris Bartowski <<a href="mailto:kpoloczek@vp.pl" target="_blank">kpoloczek@vp.pl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
gwaldron wrote:<br>
> Kris,You want to install an osgGA::GUIEventHandler, override the handle method, and listen for the MOVE or DRAG events. DRAG fires when moving the mouse with a button down.<br>
> Glenn Waldron / osgEarth<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> On Fri, Feb 8, 2019 at 6:03 AM Kris Bartowski < ()> wrote:<br>
> <br>
> <br>
> > Hi,<br>
> > <br>
> > I want to read the mouse location at any time, but unfortunately when i try to read it for example when event type is FRAME, it always gives me the last clicked mouse coordinates.<br>
> > <br>
> > Thank you!<br>
> > <br>
> > Cheers,<br>
> > Kris<br>
> > <br>
> > ------------------<br>
> > Read this topic online here:<br>
> > <a href="http://forum.openscenegraph.org/viewtopic.php?p=75598#75598" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=75598#75598</a> (<a href="http://forum.openscenegraph.org/viewtopic.php?p=75598#75598" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=75598#75598</a>)<br>
> > <br>
> > <br>
> > <br>
> > <br>
> > <br>
> > _______________________________________________<br>
> > osg-users mailing list<br>
> > ()<br>
> > <a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a> (<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>)<br>
> > <br>
> <br>
> <br>
> ------------------<br>
> Post generated by Mail2Forum<br>
<br>
<br>
That's what i do, but for some reason ea->getEventType() is never equal to osgGA::GUIEventAdapter::MOVE, i am notified only when the DRAG and PUSH events fire. <br>
<br>
I use OpenSceneGraph Library 3.2.3<br>
<br>
~Kris<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=75624#75624" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=75624#75624</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_8884803808246178453gmail_signature">trajce nikolov nick<br></div>