From 9226383d377b4d25e7d9ea241795540b16ee3bc2 Mon Sep 17 00:00:00 2001 From: hybrid Date: Wed, 30 Jul 2008 23:16:08 +0000 Subject: [PATCH] Fix to make the OIS interfacing work under Linux. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1435 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/CIrrDeviceLinux.cpp | 2 ++ source/Irrlicht/COpenGLDriver.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Irrlicht/CIrrDeviceLinux.cpp b/source/Irrlicht/CIrrDeviceLinux.cpp index c7ee1675..2532288a 100644 --- a/source/Irrlicht/CIrrDeviceLinux.cpp +++ b/source/Irrlicht/CIrrDeviceLinux.cpp @@ -496,6 +496,7 @@ bool CIrrDeviceLinux::createWindow() InputOutput, visual->visual, CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect, &attributes); + CreationParams.WindowId = (void*)window; XWarpPointer(display, None, window, 0, 0, 0, 0, 0, 0); XMapRaised(display, window); @@ -517,6 +518,7 @@ bool CIrrDeviceLinux::createWindow() InputOutput, visual->visual, CWBorderPixel | CWColormap | CWEventMask, &attributes); + CreationParams.WindowId = (void*)window; } else { diff --git a/source/Irrlicht/COpenGLDriver.cpp b/source/Irrlicht/COpenGLDriver.cpp index 8310a517..ee27dafe 100644 --- a/source/Irrlicht/COpenGLDriver.cpp +++ b/source/Irrlicht/COpenGLDriver.cpp @@ -215,7 +215,7 @@ COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params, #endif ExposedData.OpenGLLinux.X11Context = glXGetCurrentContext(); ExposedData.OpenGLLinux.X11Display = glXGetCurrentDisplay(); - ExposedData.OpenGLLinux.X11Window = glXGetCurrentDrawable(); + ExposedData.OpenGLLinux.X11Window = (unsigned long)params.WindowId; genericDriverInit(params.WindowSize, params.Stencilbuffer);