From 5252ffa104ae7b5f3bcd198a83c12425dcd91429 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 15 Jun 2013 16:53:54 +0200 Subject: [PATCH] More cleanup --- apps/openmw/mwinput/inputmanagerimp.cpp | 1 - apps/openmw/mwrender/renderingmanager.cpp | 2 - extern/sdl4ogre/sdlinputwrapper.cpp | 55 +---------------------- extern/sdl4ogre/sdlinputwrapper.hpp | 2 - 4 files changed, 1 insertion(+), 59 deletions(-) diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 1c184883f3..e3fc0ba2a9 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 22d47cfc03..9de183978d 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -16,8 +16,6 @@ #include #include -#include "SDL2/SDL.h" - #include #include diff --git a/extern/sdl4ogre/sdlinputwrapper.cpp b/extern/sdl4ogre/sdlinputwrapper.cpp index fcd393dfaf..3f1b8577fd 100644 --- a/extern/sdl4ogre/sdlinputwrapper.cpp +++ b/extern/sdl4ogre/sdlinputwrapper.cpp @@ -30,6 +30,7 @@ namespace SFO { _setupOISKeys(); + // FIXME: text input should only be enabled when a text input widget currently has focus SDL_StartTextInput(); } @@ -42,60 +43,6 @@ namespace SFO SDL_StopTextInput(); } - /* - void InputWrapper::initFromRenderWindow(Ogre::RenderWindow *win) - { - assert(mSDLWindow == NULL); - - mOwnWindow = true; - - //get the HWND from ogre's renderwindow - size_t windowHnd; - win->getCustomAttribute("WINDOW", &windowHnd); - - //wrap our own event handler around ogre's - mSDLWindow = SDL_CreateWindowFrom((void*)windowHnd); - - assert(mSDLWindow != NULL); - - //without this SDL will take ownership of the window and iconify it when - //we alt-tab away. - //SDL_SetWindowFullscreen(mSDLWindow, 0); - -#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX - //linux-specific event-handling fixups - //see http://bugzilla.libsdl.org/show_bug.cgi?id=730 - SDL_SysWMinfo wm_info; - SDL_VERSION(&wm_info.version); - - if(SDL_GetWindowWMInfo(mSDLWindow,&wm_info)) - { - Display* display = wm_info.info.x11.display; - Window w = wm_info.info.x11.window; - - // Set the input hints so we get keyboard input - XWMHints *wmhints = XAllocWMHints(); - if (wmhints) { - wmhints->input = True; - wmhints->flags = InputHint; - XSetWMHints(display, w, wmhints); - XFree(wmhints); - } - - //make sure to subscribe to XLib's events - XSelectInput(display, w, - (FocusChangeMask | EnterWindowMask | LeaveWindowMask | - ExposureMask | ButtonPressMask | ButtonReleaseMask | - PointerMotionMask | KeyPressMask | KeyReleaseMask | - PropertyChangeMask | StructureNotifyMask | - KeymapStateMask)); - - XFlush(display); - } -#endif - } - */ - void InputWrapper::capture() { SDL_Event evt; diff --git a/extern/sdl4ogre/sdlinputwrapper.hpp b/extern/sdl4ogre/sdlinputwrapper.hpp index 62141d514d..cb9804d548 100644 --- a/extern/sdl4ogre/sdlinputwrapper.hpp +++ b/extern/sdl4ogre/sdlinputwrapper.hpp @@ -19,8 +19,6 @@ namespace SFO InputWrapper(SDL_Window *window, Ogre::RenderWindow* ogreWindow); ~InputWrapper(); - //void initFromRenderWindow(Ogre::RenderWindow* win); - void setMouseEventCallback(MouseListener* listen) { mMouseListener = listen; } void setKeyboardEventCallback(KeyListener* listen) { mKeyboardListener = listen; } void setWindowEventCallback(WindowListener* listen) { mWindowListener = listen; }