summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2011-02-08 09:43:10 (GMT)
committerFabien Freling <fabien.freling@nokia.com>2011-02-08 09:54:17 (GMT)
commite7c3a905637a157d4989682c49b7c5691071eb81 (patch)
tree1d0e7926e4460046b299d139c4f833defe7a4a00 /src
parent988d67957fdb7f5b50c8bff6c70e2ae299f7744c (diff)
downloadQt-e7c3a905637a157d4989682c49b7c5691071eb81.zip
Qt-e7c3a905637a157d4989682c49b7c5691071eb81.tar.gz
Qt-e7c3a905637a157d4989682c49b7c5691071eb81.tar.bz2
Force the repaint during live resize.
During live resize on Mac, it is important to keep up with the resizing of the window, or the application looks sluggish. Calling update() is not enough, since we then are lagging behind the system by going through the event loop. Reviewed-by: Richard Moe Gustavsen
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm
index 6ce7b35..55f2db6 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac.mm
+++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm
@@ -215,6 +215,11 @@ static void cleanupCocoaWindowDelegate()
QWidgetPrivate::qt_mac_update_sizer(qwidget);
[self syncSizeForWidget:qwidget toSize:newSize fromSize:oldSize];
}
+
+ // We force the repaint to be synchronized with the resize of the window.
+ // Otherwise, the resize looks sluggish because we paint one event loop later.
+ if ([[window contentView] inLiveResize])
+ qwidget->repaint();
}
- (void)windowDidMove:(NSNotification *)notification