mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
app/internal/window: [macOS] assume valid view in synchronous draws
Asynchronous drawing happens only in onFrameCallback, where we have to check for disappearing views. onDraw however, is synchronous and should always have a valid view. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -187,9 +187,8 @@ func gio_onMouse(view C.CFTypeRef, cdir C.int, cbtns C.NSUInteger, x, y, dx, dy
|
|||||||
//export gio_onDraw
|
//export gio_onDraw
|
||||||
func gio_onDraw(view C.CFTypeRef) {
|
func gio_onDraw(view C.CFTypeRef) {
|
||||||
viewDo(view, func(views viewMap, view C.CFTypeRef) {
|
viewDo(view, func(views viewMap, view C.CFTypeRef) {
|
||||||
if w, exists := views[view]; exists {
|
w := views[view]
|
||||||
w.draw(true)
|
w.draw(true)
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user