mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
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:
@@ -134,7 +134,6 @@ func (l *renderLoop) Summary() string {
|
||||
}
|
||||
|
||||
func (l *renderLoop) Refresh() {
|
||||
l.ctx.Refresh()
|
||||
if l.err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
+2
-1
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user