]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed menu navigation with mouse
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 10 Oct 2001 22:44:08 +0000 (22:44 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 10 Oct 2001 22:44:08 +0000 (22:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mgl/dc.cpp
src/mgl/window.cpp

index c37533c8dd23da39e85aee877b156d95522e09df..551f5420192001126b2134037d3d260e76ec76c7 100644 (file)
@@ -1234,7 +1234,7 @@ void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
         *descent = YDEV2LOGREL(m_mglFont->descent);
     if ( externalLeading )
         *externalLeading = YDEV2LOGREL(m_mglFont->leading);
-    
+
     if ( theFont != NULL )
         wxConstCast(this, wxDC)->SetFont(oldFont);
 }
index 09f69f1dd7bc31b08d558be9f5e6be191887122a..55dfa752910664e2247fc9e22287dd00f21f82cc 100644 (file)
@@ -626,6 +626,8 @@ bool wxWindowMGL::Create(wxWindow *parent,
 
 void wxWindowMGL::SetFocus()
 {
+    if ( gs_focusedWindow == this ) return;
+
     if ( gs_focusedWindow )
         gs_focusedWindow->KillFocus();
     
@@ -658,7 +660,7 @@ void wxWindowMGL::SetFocus()
     
     wxFocusEvent event(wxEVT_SET_FOCUS, GetId());
     event.SetEventObject(this);
-    AddPendingEvent(event);
+    GetEventHandler()->ProcessEvent(event);
 }
 
 void wxWindowMGL::KillFocus()
@@ -679,7 +681,7 @@ void wxWindowMGL::KillFocus()
 
     wxFocusEvent event(wxEVT_KILL_FOCUS, GetId());
     event.SetEventObject(this);
-    AddPendingEvent(event);
+    GetEventHandler()->ProcessEvent(event);
 }
 
 // ----------------------------------------------------------------------------