forked from joejulian/gio
ui/app: introduce DestroyEvent for ending the event loop
Replace the StageDead stage with DestroyEvent dedicated to ending the event loop and, for premature window closes, the error. Drop the error return from NewWindow; any errors in window creation will appear as an immediate DestroyEvent with its Err field set. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ func onStop(view C.CFTypeRef) {
|
||||
func onDestroy(view C.CFTypeRef) {
|
||||
w := views[view]
|
||||
delete(views, view)
|
||||
w.w.event(StageEvent{StageDead})
|
||||
w.w.event(DestroyEvent{})
|
||||
C.gio_removeLayer(w.layer)
|
||||
C.CFRelease(w.layer)
|
||||
w.layer = 0
|
||||
|
||||
Reference in New Issue
Block a user