Merge branch 'wip/otte/for-main' into 'main'

testsuite: clear_current() when done

See merge request GNOME/gtk!4343
This commit is contained in:
Benjamin Otte 2022-01-06 19:07:58 +00:00
commit 8e8a746cce
3 changed files with 3 additions and 2 deletions

View File

@ -185,8 +185,7 @@ gdk_gl_context_dispose (GObject *gobject)
if (priv->egl_context != NULL)
{
GdkSurface *surface = gdk_gl_context_get_surface (context);
GdkDisplay *display = gdk_surface_get_display (surface);
GdkDisplay *display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
EGLDisplay *egl_display = gdk_display_get_egl_display (display);
if (eglGetCurrentContext () == priv->egl_context)

View File

@ -649,6 +649,7 @@ main (int argc, char *argv[])
gsk_renderer_unrealize (gl_renderer);
g_clear_object (&gl_renderer);
}
gdk_gl_context_clear_current ();
return result;
}

View File

@ -108,6 +108,7 @@ texture_threads (void)
g_clear_pointer (&loop, g_main_loop_unref);
g_clear_object (&gl_renderer);
g_main_context_release (NULL);
gdk_gl_context_clear_current ();
}
int