app: delete workarounds for driver callback deadlocks

Driver methods are invoked during event processing, but some of them may
generate events that would in turn deadlock because event processing is
not re-entrant. However, a previous change moved all such calls outside
event processing and so chained events can no longer deadlock.

This change deletes the workarounds.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-09-04 09:57:00 +02:00
parent 1796f24a38
commit 9ffe43bc3a
5 changed files with 11 additions and 19 deletions
+2 -2
View File
@@ -427,7 +427,7 @@ func Java_org_gioui_GioView_onBack(env *C.JNIEnv, class C.jclass, view C.jlong)
//export Java_org_gioui_GioView_onFocusChange
func Java_org_gioui_GioView_onFocusChange(env *C.JNIEnv, class C.jclass, view C.jlong, focus C.jboolean) {
w := views[view]
go w.callbacks.Event(key.FocusEvent{Focus: focus == C.JNI_TRUE})
w.callbacks.Event(key.FocusEvent{Focus: focus == C.JNI_TRUE})
}
//export Java_org_gioui_GioView_onWindowInsets
@@ -783,7 +783,7 @@ func (w *window) ReadClipboard() {
return
}
content := goString(env, C.jstring(c))
go w.callbacks.Event(clipboard.Event{Text: content})
w.callbacks.Event(clipboard.Event{Text: content})
})
}