mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app/internal/wm: [macOS] close display link after window close
The app.Window owner may run SetAnimating just before window close, which in turn rely on an active display link. This change makes sure the link is stopped after window close where no more driver calls can occur. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -344,10 +344,11 @@ func configFor(scale float32) unit.Metric {
|
||||
//export gio_onClose
|
||||
func gio_onClose(view C.CFTypeRef) {
|
||||
w := mustView(view)
|
||||
w.displayLink.Close()
|
||||
w.w.Event(ViewEvent{})
|
||||
deleteView(view)
|
||||
w.w.Event(system.DestroyEvent{})
|
||||
w.displayLink.Close()
|
||||
w.displayLink = nil
|
||||
C.CFRelease(w.view)
|
||||
w.view = 0
|
||||
C.CFRelease(w.window)
|
||||
|
||||
Reference in New Issue
Block a user