diff options
author | Damien Plisson <damien.plisson@yahoo.fr> | 2009-11-04 20:50:31 +0300 |
---|---|---|
committer | Damien Plisson <damien.plisson@yahoo.fr> | 2009-11-04 20:50:31 +0300 |
commit | fe82c2674e5d014b4e4c75f9337627957449dc99 (patch) | |
tree | 667feee6190d8f73f61fd2ec3bf3bcdd2d9d231e /intern | |
parent | 8af525f8604f7f6461af1ee5dffa10d2eea822a9 (diff) |
Mac / Cocoa:
- Fix update event fired at each loop iteration. Thx Brecht for the patch
- Fix missing deactivate event when in fullscreen mode
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 7716175b9f6..f0bc8dd4d0f 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -68,7 +68,7 @@ extern "C" { - (void)windowWillClose:(NSNotification *)notification; - (void)windowDidBecomeKey:(NSNotification *)notification; - (void)windowDidResignKey:(NSNotification *)notification; -- (void)windowDidUpdate:(NSNotification *)notification; +- (void)windowDidExpose:(NSNotification *)notification; - (void)windowDidResize:(NSNotification *)notification; @end @@ -91,13 +91,10 @@ extern "C" { - (void)windowDidResignKey:(NSNotification *)notification { - //The window is no more key when its own view becomes fullscreen - //but ghost doesn't know the view/window difference, so hide this fact - if (associatedWindow->getState() != GHOST_kWindowStateFullScreen) - systemCocoa->handleWindowEvent(GHOST_kEventWindowDeactivate, associatedWindow); + systemCocoa->handleWindowEvent(GHOST_kEventWindowDeactivate, associatedWindow); } -- (void)windowDidUpdate:(NSNotification *)notification +- (void)windowDidExpose:(NSNotification *)notification { systemCocoa->handleWindowEvent(GHOST_kEventWindowUpdate, associatedWindow); } @@ -622,6 +619,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state) //Make window normal and resize it [m_window setStyleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)]; [m_window setFrame:[[m_window screen] visibleFrame] display:YES]; + //TODO for 10.6 only : window title is forgotten after the style change [m_window makeFirstResponder:m_openGLView]; #else //With 10.5, we need to create a new window to change its style to borderless |