Sfoglia il codice sorgente

Fix OnFocus/OnFocusLost event dispatching

Daniel Salvadori 6 anni fa
parent
commit
6b44d8acfa
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  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)
 	}
 }