diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-30 23:48:08 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-30 23:48:08 -0400 |
| commit | 3565889e15e387fce435c3ffadeaea9823fb2eed (patch) | |
| tree | 93cf5de89c9010fc16da37949d441d97e3386f89 /test/kbtest.go | |
| parent | ffa1bbe0b91a8c812ddcea5c5d65e55f60d07f33 (diff) | |
Made Window.Closing a callback closure.
Diffstat (limited to 'test/kbtest.go')
| -rw-r--r-- | test/kbtest.go | 4 |
1 files changed, 1 insertions, 3 deletions
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) } |
