Przeglądaj źródła

Fix OnFocus/OnFocusLost event dispatching

Daniel Salvadori 6 lat temu
rodzic
commit
6b44d8acfa
1 zmienionych plików z 2 dodań i 2 usunięć
  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)
 	}
 }