diff options
author | Maarten Gribnau <mail@maartengribnau.com> | 2003-01-01 23:23:42 +0300 |
---|---|---|
committer | Maarten Gribnau <mail@maartengribnau.com> | 2003-01-01 23:23:42 +0300 |
commit | 065f294aa134cfedce9d0e984c357db2d18c7080 (patch) | |
tree | a777518d832fc9a4b614a25bba86d9f8d0c770ac /intern/ghost | |
parent | 570b0462e273a42069e70eed7097b5540259f60a (diff) |
Fixed ghost full-screen problem
After switching back from full-screen, the active window is returned to the one active before full-screen mode was entered.
Maarten
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowManager.cpp | 10 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowManager.h | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_WindowManager.cpp b/intern/ghost/intern/GHOST_WindowManager.cpp index abce72e259c..775260a9503 100644 --- a/intern/ghost/intern/GHOST_WindowManager.cpp +++ b/intern/ghost/intern/GHOST_WindowManager.cpp @@ -47,8 +47,10 @@ #include "GHOST_Window.h" -GHOST_WindowManager::GHOST_WindowManager() -: m_fullScreenWindow(0), m_activeWindow(0) +GHOST_WindowManager::GHOST_WindowManager() : + m_fullScreenWindow(0), + m_activeWindow(0), + m_activeWindowBeforeFullScreen(0) { } @@ -130,6 +132,7 @@ GHOST_TSuccess GHOST_WindowManager::beginFullScreen(GHOST_IWindow* window, GHOST_ASSERT(window->getValid(), "GHOST_WindowManager::beginFullScreen(): invalid window"); if (!getFullScreen()) { m_fullScreenWindow = window; + m_activeWindowBeforeFullScreen = getActiveWindow(); setActiveWindow(m_fullScreenWindow); success = GHOST_kSuccess; } @@ -147,6 +150,9 @@ GHOST_TSuccess GHOST_WindowManager::endFullScreen(void) delete m_fullScreenWindow; //GHOST_PRINT("GHOST_WindowManager::endFullScreen(): done\n"); m_fullScreenWindow = 0; + if (m_activeWindowBeforeFullScreen) { + setActiveWindow(m_activeWindowBeforeFullScreen); + } } success = GHOST_kSuccess; } diff --git a/intern/ghost/intern/GHOST_WindowManager.h b/intern/ghost/intern/GHOST_WindowManager.h index a88b3f792ea..f2ad003d801 100644 --- a/intern/ghost/intern/GHOST_WindowManager.h +++ b/intern/ghost/intern/GHOST_WindowManager.h @@ -155,6 +155,9 @@ protected: /** The active window. */ GHOST_IWindow* m_activeWindow; + + /** Window that was active before entering fullscreen state. */ + GHOST_IWindow* m_activeWindowBeforeFullScreen; }; #endif // _GHOST_WINDOW_MANAGER_H_ |