macosglcontext: Do not rely on default from get_required_version

get_required_version cannot warranty to return any default. Instead,
fetch the user requisites clipped by the requirements in our backend.
This commit is contained in:
Pablo Correa Gómez 2022-05-28 01:01:19 +02:00
parent d4f8a80f2a
commit f4f0daa113
No known key found for this signature in database
GPG Key ID: 7A342565FF635F79

View File

@ -378,7 +378,10 @@ gdk_macos_gl_context_real_realize (GdkGLContext *context,
existing = CGLGetCurrentContext ();
gdk_gl_context_get_required_version (context, &major, &minor);
gdk_gl_context_get_clipped_version (context,
GDK_GL_MIN_GL_VERSION_MAJOR,
GDK_GL_MIN_GL_VERSION_MINOR,
&major, &minor);
display = gdk_gl_context_get_display (context);
shared = gdk_display_get_gl_context (display);