summaryrefslogtreecommitdiff
path: root/src/gui/kernel/qwidget_mac.mm
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2010-04-09 12:41:11 +0200
committerSamuli Piippo <samuli.piippo@digia.com>2011-06-09 13:05:36 +0300
commita7dc0a46e08d590ade80fe91a26f6a7d6c566f4a (patch)
tree91b235b091b4b7560da160a7aaef1732baa5f706 /src/gui/kernel/qwidget_mac.mm
parent67ac68f4518b15d97d39d978294845c6b7956794 (diff)
downloadqt4-tools-a7dc0a46e08d590ade80fe91a26f6a7d6c566f4a.tar.gz
Force the repaint during a window resize.
Reviewed-by: Morten Sorvig Task-number: QTBUG-6384 (cherry picked from commit 3aee7881eaa45d4cbc1d0a353772cbf44638dadc)
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-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 70f3d941d0..f005732cda 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -4184,6 +4184,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);
@@ -4215,7 +4216,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
@@ -4224,7 +4225,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];
}