Commit 2aeafd70 authored by hybrid's avatar hybrid

Allow external input processing, currently supported for X11 only.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1406 dfc29bdd-3216-0410-991c-e03cc46cb475
parent e80e76c7
...@@ -26,6 +26,7 @@ namespace irr ...@@ -26,6 +26,7 @@ namespace irr
Vsync(false), Vsync(false),
AntiAlias(false), AntiAlias(false),
WithAlphaChannel(false), WithAlphaChannel(false),
IgnoreInput(false),
HighPrecisionFPU(false), HighPrecisionFPU(false),
EventReceiver(0), EventReceiver(0),
WindowId(0), WindowId(0),
...@@ -87,6 +88,13 @@ namespace irr ...@@ -87,6 +88,13 @@ namespace irr
Default value: false */ Default value: false */
bool WithAlphaChannel; bool WithAlphaChannel;
//! Specifies if the device should ignore input events
/** This is only relevant when using external I/O handlers.
External windows need to take care of this themselves.
Currently only supported under X11.
Default value: false */
bool IgnoreInput;
//! Specifies if the device should use high precision FPU setting //! Specifies if the device should use high precision FPU setting
/** This is only relevant for DirectX Devices, which switch to /** This is only relevant for DirectX Devices, which switch to
low FPU precision by default for performance reasons. However, low FPU precision by default for performance reasons. However,
......
...@@ -426,7 +426,7 @@ bool CIrrDeviceLinux::createWindow() ...@@ -426,7 +426,7 @@ bool CIrrDeviceLinux::createWindow()
{ {
if (CreationParams.Stencilbuffer) if (CreationParams.Stencilbuffer)
{ {
os::Printer::log("No stencilbuffer available, disabling stencil shadows.", ELL_WARNING); os::Printer::log("No stencilbuffer available, disabling.", ELL_WARNING);
CreationParams.Stencilbuffer = false; CreationParams.Stencilbuffer = false;
} }
visualAttrBuffer[15]=0; visualAttrBuffer[15]=0;
...@@ -479,9 +479,11 @@ bool CIrrDeviceLinux::createWindow() ...@@ -479,9 +479,11 @@ bool CIrrDeviceLinux::createWindow()
attributes.colormap = colormap; attributes.colormap = colormap;
attributes.border_pixel = 0; attributes.border_pixel = 0;
attributes.event_mask = KeyPressMask | ButtonPressMask | attributes.event_mask = StructureNotifyMask;
StructureNotifyMask | PointerMotionMask | if (!CreationParams.IgnoreInput)
ButtonReleaseMask | KeyReleaseMask; attributes.event_mask |= PointerMotionMask |
ButtonPressMask | KeyPressMask |
ButtonReleaseMask | KeyReleaseMask;
// create Window, either for Fullscreen or windowed mode // create Window, either for Fullscreen or windowed mode
if (CreationParams.Fullscreen) if (CreationParams.Fullscreen)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment