fixing window closing

This commit is contained in:
Gabriel Pedro 2016-06-13 19:41:36 -04:00
parent 02104c77a4
commit 2665d9e8cd
1 changed files with 2 additions and 1 deletions

View File

@ -127,10 +127,11 @@ func (w *Window) OnClosing(f func(*Window) bool) {
func doOnClosing(ww *C.uiWindow, data unsafe.Pointer) C.int {
w := windows[ww]
if w.onClosing == nil {
return 0
return 1
}
if w.onClosing(w) {
w.Destroy()
return 1
}
return 0
}