[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24316] trunk/blender/intern/ghost/intern/ GHOST_WindowCocoa.mm: Mac / Cocoa:

Damien Plisson damien.plisson at yahoo.fr
Wed Nov 4 18:50:31 CET 2009


Revision: 24316
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24316
Author:   damien78
Date:     2009-11-04 18:50:31 +0100 (Wed, 04 Nov 2009)

Log Message:
-----------
Mac / Cocoa:

- Fix update event fired at each loop iteration. Thx Brecht for the patch
- Fix missing deactivate event when in fullscreen mode

Modified Paths:
--------------
    trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm	2009-11-04 17:16:58 UTC (rev 24315)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm	2009-11-04 17:50:31 UTC (rev 24316)
@@ -68,7 +68,7 @@
 - (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 @@
 
 - (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 @@
 				//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





More information about the Bf-blender-cvs mailing list