~f4814n/frost

80ea2c08f25c6adbe8c99efcb9756d242fbb1dff — Fabian Geiselhart 10 months ago e4e468b
Handle system.CommandEvent s
1 files changed, 7 insertions(+), 0 deletions(-)

M cmd/frost/main.go
M cmd/frost/main.go => cmd/frost/main.go +7 -0
@@ 94,6 94,13 @@ func (a *App) run() error {
					Right: e.Insets.Right,
				}.Layout(gtx, a.view.Layout)
				e.Frame(gtx.Ops)
			case *system.CommandEvent:
				switch e.Type {
				case system.CommandBack:
					e.Cancel = true
					a.tx <- BackEvent{}
					a.rx <- InvalidationEvent{}
				}
			case system.DestroyEvent:
				return e.Err
			}