summaryrefslogtreecommitdiff
path: root/gdk/x11
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2023-04-25 21:45:31 +0200
committerBenjamin Otte <otte@redhat.com>2023-04-27 02:13:32 +0200
commit5f833f1d31c7a1699a997d73c1c5be6e2ad5b08d (patch)
tree0357a2d326972e1c4e6d7363a7ebeb66773f45ec /gdk/x11
parentb8958419e657058ac705968c5e1a733013af5dcd (diff)
downloadgtk+-5f833f1d31c7a1699a997d73c1c5be6e2ad5b08d.tar.gz
glcontext: Compute matching version the simple way
Do it all in one function instead of requiring two different ones.
Diffstat (limited to 'gdk/x11')
-rw-r--r--gdk/x11/gdkglcontext-glx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdk/x11/gdkglcontext-glx.c b/gdk/x11/gdkglcontext-glx.c
index 229373f1e9..f6cdedbd1f 100644
--- a/gdk/x11/gdkglcontext-glx.c
+++ b/gdk/x11/gdkglcontext-glx.c
@@ -478,7 +478,7 @@ gdk_x11_context_create_glx_context (GdkGLContext *context,
GLXContext ctx;
int context_attribs[N_GLX_ATTRS], i = 0, flags = 0;
gsize major_idx, minor_idx;
- GdkGLVersion min, version;
+ GdkGLVersion version;
const GdkGLVersion* supported_versions;
gboolean debug_bit, compat_bit;
gsize j;
@@ -491,8 +491,7 @@ gdk_x11_context_create_glx_context (GdkGLContext *context,
/* We will use the default version matching the context status
* unless the user requested a version which makes sense */
- gdk_gl_context_get_matching_version (api, legacy, &min);
- gdk_gl_context_get_clipped_version (context, &min, &version);
+ gdk_gl_context_get_matching_version (context, api, legacy, &version);
debug_bit = gdk_gl_context_get_debug_enabled (context);
compat_bit = gdk_gl_context_get_forward_compatible (context);