diff --git a/src/Main/GLWindow.cpp b/src/Main/GLWindow.cpp index 764b29d..3afcf65 100644 --- a/src/Main/GLWindow.cpp +++ b/src/Main/GLWindow.cpp @@ -177,10 +177,13 @@ bool GLWindow::Create(int width, int height, int bpp, bool fullscreen) { void GLWindow::Destroy(void) { if(_glContext) { - // Some code here. + glXMakeCurrent(_display, None, NULL); + glXDestroyContext(_display, _glContext); + _glContext = NULL; } if(_isFullscreen) { - // And here.. + XF86VidModeSwitchToMode(_display, _screeID, &_XF86DeskMode); + XF86VidModeSetViewPort(_display, _screenID, 0, 0); } XCloseDisplay(_display);