*descent = YDEV2LOGREL(m_mglFont->descent);
     if ( externalLeading )
         *externalLeading = YDEV2LOGREL(m_mglFont->leading);
-    
+
     if ( theFont != NULL )
         wxConstCast(this, wxDC)->SetFont(oldFont);
 }
 
 
 void wxWindowMGL::SetFocus()
 {
+    if ( gs_focusedWindow == this ) return;
+
     if ( gs_focusedWindow )
         gs_focusedWindow->KillFocus();
     
     
     wxFocusEvent event(wxEVT_SET_FOCUS, GetId());
     event.SetEventObject(this);
-    AddPendingEvent(event);
+    GetEventHandler()->ProcessEvent(event);
 }
 
 void wxWindowMGL::KillFocus()
 
     wxFocusEvent event(wxEVT_KILL_FOCUS, GetId());
     event.SetEventObject(this);
-    AddPendingEvent(event);
+    GetEventHandler()->ProcessEvent(event);
 }
 
 // ----------------------------------------------------------------------------