fixed menu navigation with mouse
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1234,7 +1234,7 @@ void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
|
|||||||
*descent = YDEV2LOGREL(m_mglFont->descent);
|
*descent = YDEV2LOGREL(m_mglFont->descent);
|
||||||
if ( externalLeading )
|
if ( externalLeading )
|
||||||
*externalLeading = YDEV2LOGREL(m_mglFont->leading);
|
*externalLeading = YDEV2LOGREL(m_mglFont->leading);
|
||||||
|
|
||||||
if ( theFont != NULL )
|
if ( theFont != NULL )
|
||||||
wxConstCast(this, wxDC)->SetFont(oldFont);
|
wxConstCast(this, wxDC)->SetFont(oldFont);
|
||||||
}
|
}
|
||||||
|
@@ -626,6 +626,8 @@ bool wxWindowMGL::Create(wxWindow *parent,
|
|||||||
|
|
||||||
void wxWindowMGL::SetFocus()
|
void wxWindowMGL::SetFocus()
|
||||||
{
|
{
|
||||||
|
if ( gs_focusedWindow == this ) return;
|
||||||
|
|
||||||
if ( gs_focusedWindow )
|
if ( gs_focusedWindow )
|
||||||
gs_focusedWindow->KillFocus();
|
gs_focusedWindow->KillFocus();
|
||||||
|
|
||||||
@@ -658,7 +660,7 @@ void wxWindowMGL::SetFocus()
|
|||||||
|
|
||||||
wxFocusEvent event(wxEVT_SET_FOCUS, GetId());
|
wxFocusEvent event(wxEVT_SET_FOCUS, GetId());
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
AddPendingEvent(event);
|
GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowMGL::KillFocus()
|
void wxWindowMGL::KillFocus()
|
||||||
@@ -679,7 +681,7 @@ void wxWindowMGL::KillFocus()
|
|||||||
|
|
||||||
wxFocusEvent event(wxEVT_KILL_FOCUS, GetId());
|
wxFocusEvent event(wxEVT_KILL_FOCUS, GetId());
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
AddPendingEvent(event);
|
GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user