X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/06414d99a7a77b1aa1aa9c89e0ed5c466eb5cce8..c06359e617e99d2d3d8ce8798fcec2ccb4a6c59b:/src/mgl/window.cpp diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index 2c2fec1ed3..85f2abeee3 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -184,7 +184,7 @@ static ibool MGLAPI wxWindowMouseHandler(window_t *wnd, event_t *e) { case EVT_MOUSEDOWN: // Change focus if the user clicks outside focused window: - if ( win->AcceptsFocus() && wxWindow::FindFocus() != win ) + if ( win->CanAcceptFocus() && wxWindow::FindFocus() != win ) win->SetFocus(); if ( e->message & EVT_DBLCLICK ) @@ -704,6 +704,11 @@ void wxWindowMGL::SetFocus() gs_activeFrame->GetEventHandler()->ProcessEvent(event); } + // notify the parent keeping track of focus for the kbd navigation + // purposes that we got it + wxChildFocusEvent eventFocus((wxWindow*)this); + GetEventHandler()->ProcessEvent(eventFocus); + wxFocusEvent event(wxEVT_SET_FOCUS, GetId()); event.SetEventObject(this); event.SetWindow((wxWindow*)oldFocusedWindow);