forked from bartvdbraak/blender
OSX/Cocoa : discard Cocoa GL view flush while in live resize, and send Window size change ghost message only when user releases mouse button (not in live resize).
Potentially fixing bug [#23561]
This commit is contained in:
parent
57527cb0ac
commit
606b800c46
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user