Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/opengl.c:
return ret;
}
+static void wgl_context_refresh(struct wgl_context *ctx) +{
- BOOL refresh = FALSE;
- struct wayland_gl_drawable *old_draw = NULL, *old_read = NULL;
- pthread_mutex_lock(&gl_object_mutex);
- if (ctx->new_draw)
- {
old_draw = ctx->draw;
ctx->draw = ctx->new_draw;
InterlockedIncrement(&ctx->draw->ref);
ctx->new_draw = NULL;
And then use `wayland_gl_drawable_acquire` here instead of open-coded ref count,
```suggestion:-2+0 ctx->draw = wayland_gl_drawable_acquire(ctx->new_draw); ctx->new_draw = NULL; ```