diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-05-16 19:53:17 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-05-16 19:53:34 +0200 |
commit | 821c42b10a7095124a9afbbba3f9bc687ace40e6 (patch) | |
tree | 2bd58d671e0bb6eb308ae6d79a68d10cd01d05e2 /avmedia | |
parent | 9199616e9d6bd04e60a5135df3b2ba7113a5f436 (diff) |
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
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/opengl/oglwindow.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
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()) { |