OGLWindow: fix key capturing issue

Sometimes the event handler parent captures the mouse
moce which should grab the focus for key event handling.

Change-Id: Ida1022968543059154de824fc3d026c5cecba7b3
This commit is contained in:
Zolnai Tamás 2014-05-16 19:53:17 +02:00
parent 9199616e9d
commit 821c42b10a

View File

@ -292,6 +292,10 @@ IMPL_LINK(OGLWindow, CameraHandler, VclWindowEvent*, pEvent)
} }
else if( pEvent->GetId() == VCLEVENT_WINDOW_MOUSEMOVE ) else if( pEvent->GetId() == VCLEVENT_WINDOW_MOUSEMOVE )
{ {
if ( !m_pEventHandler->HasFocus() )
{
m_pEventHandler->GrabFocus();
}
MouseEvent* pMouseEvt = (MouseEvent*)pEvent->GetData(); MouseEvent* pMouseEvt = (MouseEvent*)pEvent->GetData();
if(pMouseEvt && pMouseEvt->IsLeft()) if(pMouseEvt && pMouseEvt->IsLeft())
{ {