ソースを参照

Fix OnFocus/OnFocusLost event dispatching

Daniel Salvadori 6 年 前
コミット
6b44d8acfa
1 ファイル変更2 行追加2 行削除
  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)
 	}
 }