app: avoid deadlock on context refresh

The platform GPU context must be Refreshed on the window event thread,
but our rendering loop must not, because it may also want access to the
window event thread.

Fixes gio#236

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-06-22 19:35:00 +02:00
parent f24232dac5
commit 9df56f44e9
2 changed files with 2 additions and 2 deletions
-1
View File
@@ -134,7 +134,6 @@ func (l *renderLoop) Summary() string {
}
func (l *renderLoop) Refresh() {
l.ctx.Refresh()
if l.err != nil {
return
}
+2 -1
View File
@@ -416,8 +416,9 @@ func (w *Window) destroy(err error) {
func (w *Window) refresh() {
w.driverRun(func(_ wm.Driver) {
w.loop.Refresh()
w.ctx.Refresh()
})
w.loop.Refresh()
}
func (w *Window) destroyGPU() {