X-Git-Url: https://git.octo.it/?p=supertux.git;a=blobdiff_plain;f=src%2Fsupertux%2Fscreen_manager.cpp;h=decc603e39b7a810acdb1e0d35b8f04752503566;hp=dd1cbf7c77b26b40600a219da1907fa6cbdcca74;hb=4344af0025fd9b399666864e4cb96b3f81fd50bc;hpb=8e52a5b000d732e96b1cc461163c4778b434dc27 diff --git a/src/supertux/screen_manager.cpp b/src/supertux/screen_manager.cpp index dd1cbf7c7..decc603e3 100644 --- a/src/supertux/screen_manager.cpp +++ b/src/supertux/screen_manager.cpp @@ -27,6 +27,7 @@ #include "supertux/console.hpp" #include "supertux/constants.hpp" #include "supertux/gameconfig.hpp" +#include "supertux/game_session.hpp" #include "supertux/globals.hpp" #include "supertux/main.hpp" #include "supertux/menu/menu_storage.hpp" @@ -213,6 +214,12 @@ ScreenManager::process_events() event.window.data2); m_menu_manager->on_window_resize(); break; + + case SDL_WINDOWEVENT_FOCUS_LOST: + if(GameSession::current() != NULL) { + GameSession::current()->toggle_pause(); + } + break; } break;