summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-07 20:05:56 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-07 20:05:56 +0300
commit327312c8f5a4fb89b0d38ae179c76e9885bfb698 (patch)
tree0e9f1eb4fa3ccdcf20f30b2bfbcd678ed402371f /src/client.cpp
parentc89329623cbe5a2c3d5baf25fc58808f13af6069 (diff)
downloadmv-327312c8f5a4fb89b0d38ae179c76e9885bfb698.tar.gz
mv-327312c8f5a4fb89b0d38ae179c76e9885bfb698.tar.bz2
mv-327312c8f5a4fb89b0d38ae179c76e9885bfb698.tar.xz
mv-327312c8f5a4fb89b0d38ae179c76e9885bfb698.zip
move window events handling into eventsmanager.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/client.cpp b/src/client.cpp
index b5ae5ee09..ffd7336ef 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2922,65 +2922,6 @@ bool Client::isKeyboardVisible() const
#endif
}
-#ifdef USE_SDL2
-void Client::handleSDL2WindowEvent(const SDL_Event &event)
-{
- switch (event.window.event)
- {
- case SDL_WINDOWEVENT_RESIZED:
- resizeVideo(event.window.data1, event.window.data2, false);
- break;
- case SDL_WINDOWEVENT_ENTER:
- setMouseFocused(true);
- break;
- case SDL_WINDOWEVENT_LEAVE:
- setMouseFocused(false);
- break;
- case SDL_WINDOWEVENT_FOCUS_GAINED:
- setInputFocused(true);
- break;
- case SDL_WINDOWEVENT_FOCUS_LOST:
- setInputFocused(false);
- break;
- case SDL_WINDOWEVENT_MINIMIZED:
- setIsMinimized(true);
- break;
- case SDL_WINDOWEVENT_RESTORED:
- case SDL_WINDOWEVENT_MAXIMIZED:
- setIsMinimized(false);
- break;
- default:
- break;
- }
-}
-#else
-void Client::handleActive(const SDL_Event &event)
-{
- if (event.active.state & SDL_APPACTIVE)
- {
- if (event.active.gain)
- { // window restore
- setIsMinimized(false);
- setPriority(true);
- }
- else
- { // window minimization
-#if defined(ANDROID) && !defined(USE_SDL2)
- setState(STATE_EXIT);
-#else
- setIsMinimized(true);
- setPriority(false);
-#endif
- }
- }
-
- if (event.active.state & SDL_APPINPUTFOCUS)
- setInputFocused(event.active.gain);
- if (event.active.state & SDL_APPMOUSEFOCUS)
- setMouseFocused(event.active.gain);
-}
-#endif
-
#ifdef ANDROID
#ifdef USE_SDL2
void Client::extractAssets()