Workaround for Mac OS, fixes focus after a mouse click.

This commit is contained in:
Maciej Suminski 2014-05-15 17:08:15 +02:00
parent 4fcaf4c586
commit ebf35fd43a
1 changed files with 7 additions and 0 deletions

View File

@ -240,6 +240,13 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_MOTION, mods );
evt->SetMousePosition( pos );
}
#ifdef __APPLE__
// TODO That's a big ugly workaround, somehow DRAWPANEL_GAL loses focus
// after second LMB click and currently I have no means to do better debugging
if( type == wxEVT_LEFT_UP )
m_editFrame->GetGalCanvas()->SetFocus();
#endif /* __APPLE__ */
}
// Keyboard handling