From 821c42b10a7095124a9afbbba3f9bc687ace40e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolnai=20Tam=C3=A1s?= Date: Fri, 16 May 2014 19:53:17 +0200 Subject: [PATCH] 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 --- avmedia/source/opengl/oglwindow.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/avmedia/source/opengl/oglwindow.cxx b/avmedia/source/opengl/oglwindow.cxx index 90e32edb187f..ec21651e2d50 100644 --- a/avmedia/source/opengl/oglwindow.cxx +++ b/avmedia/source/opengl/oglwindow.cxx @@ -292,6 +292,10 @@ IMPL_LINK(OGLWindow, CameraHandler, VclWindowEvent*, pEvent) } else if( pEvent->GetId() == VCLEVENT_WINDOW_MOUSEMOVE ) { + if ( !m_pEventHandler->HasFocus() ) + { + m_pEventHandler->GrabFocus(); + } MouseEvent* pMouseEvt = (MouseEvent*)pEvent->GetData(); if(pMouseEvt && pMouseEvt->IsLeft()) {