[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30648] branches/soc-2010-merwin/intern/ ghost/intern: provided a way for NDOF manager to poke SystemCocoa about out-of-loop events

Mike Erwin significant.bit at gmail.com
Fri Jul 23 08:36:10 CEST 2010


Revision: 30648
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30648
Author:   merwin
Date:     2010-07-23 08:36:08 +0200 (Fri, 23 Jul 2010)

Log Message:
-----------
provided a way for NDOF manager to poke SystemCocoa about out-of-loop events

Modified Paths:
--------------
    branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.h
    branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.mm

Modified: branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.h
===================================================================
--- branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.h	2010-07-23 05:49:12 UTC (rev 30647)
+++ branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.h	2010-07-23 06:36:08 UTC (rev 30648)
@@ -234,14 +234,18 @@
      * @return Indication whether the event was handled. 
      */
     GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window);
-	
+
 	/**
      * Handles the Cocoa event telling the application has become active (again)
      * @return Indication whether the event was handled. 
      */
     GHOST_TSuccess handleApplicationBecomeActiveEvent();
-	
-	
+
+	/**
+     * External objects should call this when they send an event outside processEvents.
+     */
+	void notifyExternalEventProcessed();
+
 protected:
 	/**
 	 * Initializes the system.
@@ -298,7 +302,7 @@
 	/** Start time at initialization. */
 	GHOST_TUns64 m_start_time;
 	
-	/** Event has been processed directly by Cocoa and has sent a ghost event to be dispatched */
+	/** Event has been processed directly by Cocoa (or NDOF manager) and has sent a ghost event to be dispatched */
 	bool m_outsideLoopEventProcessed;
 	
 	/** Raised window is not yet known by the window manager, so delay application become active event handling */

Modified: branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.mm	2010-07-23 05:49:12 UTC (rev 30647)
+++ branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.mm	2010-07-23 06:36:08 UTC (rev 30648)
@@ -994,6 +994,8 @@
 	if (m_needDelayedApplicationBecomeActiveEventProcessing)
 		handleApplicationBecomeActiveEvent();
 	
+//	m_outsideLoopEventProcessed |= m_ndofManager->sendMotionEvent();
+	
 	if (m_outsideLoopEventProcessed) {
 		m_outsideLoopEventProcessed = false;
 		return true;
@@ -1038,6 +1040,11 @@
 	return GHOST_kSuccess;
 }
 
+void GHOST_SystemCocoa::notifyExternalEventProcessed()
+{
+	m_outsideLoopEventProcessed = true;
+}
+
 //Note: called from NSWindow delegate
 GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window)
 {





More information about the Bf-blender-cvs mailing list