Added closeRequested support to linux

This commit is contained in:
Elias Naur 2003-02-09 17:01:01 +00:00
parent 36d8f34e86
commit c022100cab
4 changed files with 99 additions and 78 deletions

View file

@ -42,11 +42,13 @@
#include "extgl.h"
#include "org_lwjgl_opengl_BaseGL.h"
GLXContext context = NULL; // OpenGL rendering context
static GLXContext context = NULL; // OpenGL rendering context
extern XVisualInfo * getVisualInfo(void);
extern Window win;
extern Display * disp;
extern void handleMessages();
void makeCurrent(void) {
glXMakeCurrent(disp, win, context);
}
@ -113,6 +115,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_BaseGL_nDestroy
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_BaseGL_swapBuffers(JNIEnv * env, jobject obj)
{
handleMessages();
glXSwapBuffers(disp, win);
}