From 1fb73742a9209d365d831a8fba9437dc5b3b776a Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Thu, 3 Aug 2017 15:15:33 +0200 Subject: [PATCH] Fix windows state after fullscreen --- src/event.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/event.cxx b/src/event.cxx index d37f791..69a83ea 100644 --- a/src/event.cxx +++ b/src/event.cxx @@ -1624,6 +1624,8 @@ void CEvent::SetFullScreen (bool bFullScreen) m_bFullScreen = bFullScreen; SDL_SetWindowFullscreen (g_window, bFullScreen ? SDL_WINDOW_FULLSCREEN : 0); + SDL_SetWindowBordered (g_window, bFullScreen ? SDL_FALSE : SDL_TRUE); + SDL_SetWindowGrab (g_window, bFullScreen ? SDL_TRUE : SDL_FALSE); SDL_SetWindowPosition (g_window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);