fixing window closing
This commit is contained in:
parent
02104c77a4
commit
2665d9e8cd
|
@ -127,10 +127,11 @@ func (w *Window) OnClosing(f func(*Window) bool) {
|
||||||
func doOnClosing(ww *C.uiWindow, data unsafe.Pointer) C.int {
|
func doOnClosing(ww *C.uiWindow, data unsafe.Pointer) C.int {
|
||||||
w := windows[ww]
|
w := windows[ww]
|
||||||
if w.onClosing == nil {
|
if w.onClosing == nil {
|
||||||
return 0
|
return 1
|
||||||
}
|
}
|
||||||
if w.onClosing(w) {
|
if w.onClosing(w) {
|
||||||
w.Destroy()
|
w.Destroy()
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue