src/glinject/glinject.c
/*
 * Handles the destruction of a GLXContext. Called when glXDestroy is
 * called on a context.
 */
Handles the destruction of a GLXContext. Called when glXDestroy is
called on a context.
Handles the destruction of a GLXContext . Called when glXDestroy is called on a context .
void glinject_handle_context_destruction(Display* dpy, GLXContext context) {
	pthread_mutex_lock(&glinject_mutex);
	lua_getglobal(L, "handle_context_destruction");
	if (!lua_isfunction(L, -1)) {
		fprintf(stderr, "handle_context_destruction is not a function!\n");
		return;
	}
	lua_pushlightuserdata(L, dpy);
	lua_pushlightuserdata(L, context);
	if (lua_pcall(L, 2, 0, 0) != 0) {
		fprintf(stderr, "error running function: %s\n", lua_tostring(L, -1));
	}
	pthread_mutex_unlock(&glinject_mutex);
}
void glinject_handle_context_destruction ( Display * dpy , GLXContext context ) { pthread_mutex_lock ( & glinject_mutex ) ; lua_getglobal ( L , " " ) ; if ( ! lua_isfunction ( L , -1 ) ) { fprintf ( stderr , " \n " ) ; return ; } lua_pushlightuserdata ( L , dpy ) ; lua_pushlightuserdata ( L , context ) ; if ( lua_pcall ( L , 2 , 0 , 0 ) != 0 ) { fprintf ( stderr , " \n " , lua_tostring ( L , -1 ) ) ; } pthread_mutex_unlock ( & glinject_mutex ) ; }
Handles the destruction of a GLXContext.
Handles the destruction of a GLXContext .