mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app: [android] ensure a new frame is always scheduled when visible and animating
Possible fix to #614. References: https://todo.sr.ht/~eliasnaur/gio/614 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+4
-4
@@ -575,10 +575,7 @@ func Java_org_gioui_GioView_onFrameCallback(env *C.JNIEnv, class C.jclass, view
|
||||
if !exist {
|
||||
return
|
||||
}
|
||||
if w.visible && w.animating {
|
||||
w.draw(env, false)
|
||||
callVoidMethod(env, w.view, gioView.postFrameCallback)
|
||||
}
|
||||
w.draw(env, false)
|
||||
}
|
||||
|
||||
//export Java_org_gioui_GioView_onBack
|
||||
@@ -882,6 +879,9 @@ func (w *window) draw(env *C.JNIEnv, sync bool) {
|
||||
},
|
||||
Sync: sync,
|
||||
})
|
||||
if w.animating {
|
||||
callVoidMethod(env, w.view, gioView.postFrameCallback)
|
||||
}
|
||||
a11yActive, err := callBooleanMethod(env, w.view, gioView.isA11yActive)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
Reference in New Issue
Block a user