Bladeren bron

Fix OnFocus/OnFocusLost event dispatching

Daniel Salvadori 6 jaren geleden
bovenliggende
commit
6b44d8acfa
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      gui/manager.go

+ 2 - 2
gui/manager.go

@@ -74,11 +74,11 @@ func (gm *manager) SetKeyFocus(disp core.IDispatcher) {
 		return
 	}
 	if gm.keyFocus != nil {
-		gm.keyFocus.Dispatch(OnFocus, nil)
+		gm.keyFocus.Dispatch(OnFocusLost, nil)
 	}
 	gm.keyFocus = disp
 	if gm.keyFocus != nil {
-		gm.keyFocus.Dispatch(OnFocusLost, nil)
+		gm.keyFocus.Dispatch(OnFocus, nil)
 	}
 }