OSX/Cocoa : discard Cocoa GL view flush while in live resize, and send Window size...
[blender-staging.git] / intern / ghost / intern / GHOST_SystemCocoa.mm
index b7038a30e0086bdb83f327b8685063c043f6c10a..c998539fea1a22654329139363af391aa525b606 100644 (file)
@@ -987,6 +987,8 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
                return true;
        }
        
+       m_ignoreWindowSizedMessages = false;
+       
     return anyProcessed;
 }
 
@@ -1054,8 +1056,10 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType,
                        case GHOST_kEventWindowSize:
                                if (!m_ignoreWindowSizedMessages)
                                {
+                                       //Enforce only one resize message per event loop (coalescing all the live resize messages)                                      
                                        window->updateDrawingContext();
                                        pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowSize, window) );
+                                       m_ignoreWindowSizedMessages = true;
                                }
                                break;
                        default: