Cocoa integration - do not invalidate backing store on move
If window is only moving, there is no reason to reset a backing store, otherwise with current expose/flush events machinery it's possible to have glitches while moving a window programmatically. Change-Id: Ia4408bd23388e529ae93617a92ae84304b707ca1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This commit is contained in:
parent
fdd2ab58ae
commit
840831b611
@ -356,6 +356,8 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
|
||||
if (m_platformWindow->m_nsWindow && geometry == m_platformWindow->geometry())
|
||||
return;
|
||||
|
||||
const bool isResize = geometry.size() != m_platformWindow->geometry().size();
|
||||
|
||||
// It can happen that self.window is nil (if we are changing
|
||||
// styleMask from/to borderless and content view is being re-parented)
|
||||
// - this results in an invalid coordinates.
|
||||
@ -385,7 +387,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
|
||||
// calles, which Qt and Qt applications do not excpect.
|
||||
if (!m_platformWindow->m_inSetGeometry)
|
||||
QWindowSystemInterface::flushWindowSystemEvents();
|
||||
else
|
||||
else if (isResize)
|
||||
m_backingStore = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user