Cocoa : correctly handle late events sent after window deactivate
[blender.git] / intern / ghost / intern / GHOST_WindowManager.cpp
index 15ee41e3dce6221d8d57b0084d3fda9611339647..56b7c622d9a317ffbb20b7381cee5941963c580b 100644 (file)
@@ -193,6 +193,18 @@ std::vector<GHOST_IWindow *> &GHOST_WindowManager::getWindows()
 }
 
 
+GHOST_IWindow* GHOST_WindowManager::getWindowAssociatedWithOSWindow(void* osWindow)
+{
+       std::vector<GHOST_IWindow*>::iterator iter;
+
+       for (iter = m_windows.begin(); iter != m_windows.end(); iter++) {
+               if ((*iter)->getOSWindow() == osWindow)
+                       return *iter;
+       }
+       
+       return NULL;
+}
+
 bool GHOST_WindowManager::getAnyModifiedState()
 {
        bool isAnyModified = false;