Applied patch for keyboard control in composite
windows as discussed in patch 1102862. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -159,8 +159,9 @@ static pascal OSStatus TextInputEventHandler( EventHandlerCallRef handler , Even
|
|||||||
static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
|
static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
|
||||||
{
|
{
|
||||||
OSStatus result = eventNotHandledErr ;
|
OSStatus result = eventNotHandledErr ;
|
||||||
|
// call DoFindFocus instead of FindFocus, because for Composite Windows(like WxGenericListCtrl)
|
||||||
wxWindow* focus = wxWindow::FindFocus() ;
|
// FindFocus does not return the actual focus window,but the enclosing window
|
||||||
|
wxWindow* focus = wxWindow::DoFindFocus();
|
||||||
if ( focus == NULL )
|
if ( focus == NULL )
|
||||||
return result ;
|
return result ;
|
||||||
|
|
||||||
@@ -212,7 +213,6 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event
|
|||||||
event.m_x = point.h;
|
event.m_x = point.h;
|
||||||
event.m_y = point.v;
|
event.m_y = point.v;
|
||||||
event.SetTimestamp(when);
|
event.SetTimestamp(when);
|
||||||
wxWindow* focus = wxWindow::FindFocus() ;
|
|
||||||
event.SetEventObject(focus);
|
event.SetEventObject(focus);
|
||||||
|
|
||||||
if ( focus && (modifiers ^ wxTheApp->s_lastModifiers ) & controlKey )
|
if ( focus && (modifiers ^ wxTheApp->s_lastModifiers ) & controlKey )
|
||||||
|
Reference in New Issue
Block a user