summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2010-04-09 12:41:11 +0200
committerFabien Freling <fabien.freling@nokia.com>2010-04-09 12:41:30 +0200
commit3aee7881eaa45d4cbc1d0a353772cbf44638dadc (patch)
treeca019a27f24854671ea669320fcdcd0107fabe70
parent525077c24984e5680eafca81622f7ea338fee29a (diff)
downloadqt4-tools-3aee7881eaa45d4cbc1d0a353772cbf44638dadc.tar.gz
Force the repaint during a window resize.
Reviewed-by: Morten Sorvig Task-number: QTBUG-6384
-rw-r--r--src/gui/kernel/qwidget_mac.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 3d86936ad8..d7cd2eb525 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -4267,6 +4267,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
QMacCocoaAutoReleasePool pool;
bool realWindow = isRealWindow();
+ BOOL needDisplay = realWindow ? YES : NO;
if (realWindow && !q->testAttribute(Qt::WA_DontShowOnScreen)){
adjustWithinMaxAndMinSize(w, h);
@@ -4314,7 +4315,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
if (currTopLeft.x() == x && currTopLeft.y() == y
&& cocoaFrameRect.size.width != 0
&& cocoaFrameRect.size.height != 0) {
- [window setFrame:cocoaFrameRect display:NO];
+ [window setFrame:cocoaFrameRect display:needDisplay];
} else {
// The window is moved and resized (or resized to zero).
// Since Cocoa usually only sends us a resize callback after
@@ -4323,7 +4324,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
// would have the same origin as the setFrame call) we shift the
// window back and forth inbetween.
cocoaFrameRect.origin.y += 1;
- [window setFrame:cocoaFrameRect display:NO];
+ [window setFrame:cocoaFrameRect display:needDisplay];
cocoaFrameRect.origin.y -= 1;
[window setFrameOrigin:cocoaFrameRect.origin];
}