summaryrefslogtreecommitdiff
path: root/gdk/gdkdisplay.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2014-10-09 17:24:21 +0200
committerMatthias Clasen <mclasen@redhat.com>2014-10-13 10:43:32 -0400
commitfdeb4f8c164bcdc1b54ed46f9e5b7185694ff623 (patch)
tree5ea13c065a6e2285bbe2a639aef6509fd47396bf /gdk/gdkdisplay.c
parent017775f28863f233e6683dae723a01f502a8b554 (diff)
downloadgtk+-fdeb4f8c164bcdc1b54ed46f9e5b7185694ff623.tar.gz
gl: Make gdk_gl_context_make_current() return void
Its not really reasonable to handle failures to make_current, it basically only happens if you pass invalid arguments to it, and thats not something we trap on similar things on the X drawing side. If GL is not supported that should be handled by the context creation failing, and anything going wrong after that is essentially a critical (or an async X error).
Diffstat (limited to 'gdk/gdkdisplay.c')
-rw-r--r--gdk/gdkdisplay.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index f0c5e21398..d6fd187692 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -2258,17 +2258,15 @@ gdk_display_destroy_gl_context (GdkDisplay *display,
*
* Makes the given @context the current GL context, or unsets
* the current GL context if @context is %NULL.
- *
- * Returns: %TRUE if successful
*/
-gboolean
+void
gdk_display_make_gl_context_current (GdkDisplay *display,
GdkGLContext *context)
{
GdkGLContext *current = gdk_display_get_current_gl_context (display);
if (current == context)
- return TRUE;
+ return;
if (context == NULL)
g_object_set_data (G_OBJECT (display), "-gdk-gl-current-context", NULL);
@@ -2277,7 +2275,7 @@ gdk_display_make_gl_context_current (GdkDisplay *display,
g_object_ref (context),
(GDestroyNotify) g_object_unref);
- return GDK_DISPLAY_GET_CLASS (display)->make_gl_context_current (display, context);
+ GDK_DISPLAY_GET_CLASS (display)->make_gl_context_current (display, context);
}
/*< private >