--- cegui-0.8.7/samples_framework/include/CEGuiOgreBaseApplication.h.orig	2018-07-21 00:26:53.505851200 +0300
+++ cegui-0.8.7/samples_framework/include/CEGuiOgreBaseApplication.h	2018-07-21 00:26:57.219063600 +0300
@@ -33,6 +33,11 @@
 #include "CEGUI/RendererModules/Ogre/Renderer.h"
 #include <Ogre.h>
 #include <OIS.h>
+#if (OGRE_VERSION >= ((1 << 16) | (10 << 8) | 0))
+#include <Bites/OgreWindowEventUtilities.h>
+#else
+#include <OgreWindowEventUtilities.h>
+#endif
 #include <OgreFrameListener.h>
 
 #include <OgreBuildSettings.h>
@@ -155,7 +157,7 @@
 };
 
 //! window event listener class we use to hear abour window resizing
-class WndEvtListener : public Ogre::WindowEventListener
+class WndEvtListener : public OgreBites::WindowEventListener
 {
 public:
     WndEvtListener(OIS::Mouse* mouse);
--- cegui-0.8.7/samples_framework/src/CEGuiOgreBaseApplication.cpp.orig	2018-07-21 00:16:21.955728600 +0300
+++ cegui-0.8.7/samples_framework/src/CEGuiOgreBaseApplication.cpp	2018-07-21 00:24:11.656593900 +0300
@@ -36,12 +36,15 @@
 #include "CEGUISamplesConfig.h"
 #ifdef CEGUI_SAMPLES_RENDERER_OGRE_ACTIVE
 
-#include <OgreWindowEventUtilities.h>
 #include "CEGuiOgreBaseApplication.h"
 #include "SamplesFrameworkBase.h"
 #include "CEGUI/RendererModules/Ogre/ImageCodec.h"
 #include "CEGUI/RendererModules/Ogre/ResourceProvider.h"
 
+#if (OGRE_VERSION >= ((1 << 16) | (10 << 8) | 0))
+#include <Bites/OgreBitesConfigDialog.h>
+#endif
+
 //----------------------------------------------------------------------------//
 CEGuiOgreBaseApplication::CEGuiOgreBaseApplication() :
     d_ogreRoot(0),
@@ -65,8 +68,11 @@
 #endif
 
     setupDefaultConfigIfNeeded();
-
+#if (OGRE_VERSION >= ((1 << 16) | (10 << 8) | 0))
+    if (d_ogreRoot->showConfigDialog(OgreBites::getNativeConfigDialog()))
+#else
     if (d_ogreRoot->showConfigDialog())
+#endif
     {
         // initialise system according to user options.
         d_window = d_ogreRoot->initialise(true);
