diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 4 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index b7038a30e00..c998539fea1 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -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: diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 83f86840eb4..aed9bd07cdc 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -280,6 +280,18 @@ extern "C" { return YES; } +- (void) drawRect:(NSRect)rect +{ + if ([self inLiveResize]) + { + //Don't redraw while in live resize + } + else + { + [super drawRect:rect]; + } +} + @end |