summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2016-03-04 11:11:17 +0100
committerTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2016-03-04 12:03:24 +0000
commit840831b6116a289ce45377aa5366974e6ec7c0e8 (patch)
treec14b51d76b41bdbc8c4a02f653a438a6ecfb6387 /src
parentfdd2ab58ae5c0ed581c0897f5207aa62cb29c785 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 05dcbd33ad..cb119e7e0d 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -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;
}
}