Move video wrapper to the WindowsManager

This commit is contained in:
Andrei Kortunov 2020-04-16 17:31:20 +04:00
parent 13b7c5b519
commit f990150c49
9 changed files with 84 additions and 104 deletions

View file

@ -79,9 +79,6 @@ public:
/** @remarks The window's visibility changed */
virtual void windowVisibilityChange( bool visible ) {}
/** @remarks The window got / lost input focus */
virtual void windowFocusChange( bool have_focus ) {}
virtual void windowClosed () {}
virtual void windowResized (int x, int y) {}

View file

@ -231,15 +231,10 @@ InputWrapper::InputWrapper(SDL_Window* window, osg::ref_ptr<osgViewer::Viewer> v
case SDL_WINDOWEVENT_FOCUS_GAINED:
mWindowHasFocus = true;
updateMouseSettings();
if (mWindowListener)
mWindowListener->windowFocusChange(true);
break;
case SDL_WINDOWEVENT_FOCUS_LOST:
mWindowHasFocus = false;
updateMouseSettings();
if (mWindowListener)
mWindowListener->windowFocusChange(false);
break;
case SDL_WINDOWEVENT_CLOSE:
break;