From 3565889e15e387fce435c3ffadeaea9823fb2eed Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 30 Jun 2014 23:48:08 -0400 Subject: Made Window.Closing a callback closure. --- test/kbtest.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'test/kbtest.go') diff --git a/test/kbtest.go b/test/kbtest.go index 4e97708..9945772 100644 --- a/test/kbtest.go +++ b/test/kbtest.go @@ -75,9 +75,6 @@ func (a *keyboardArea) Key(e KeyEvent) (repaint bool) { type kbhandler struct{} func (kbhandler) Event(e Event, d interface{}) { - if e == Closing { - *(d.(*bool)) = true - } } var doKeyboard = flag.Bool("kb", false, "run keyboard test (overrides -areabounds)") @@ -85,6 +82,7 @@ func kbTest() { wid, ht, ah := mkkbArea() a := NewArea(wid, ht, ah) w := NewWindow("Hi", wid, ht, kbhandler{}) + w.Closing = func() bool { return true } w.Open(a) } -- cgit v1.2.3