diff options
author | Fabien Freling <fabien.freling@nokia.com> | 2010-04-09 10:41:11 (GMT) |
---|---|---|
committer | Samuli Piippo <samuli.piippo@digia.com> | 2011-06-09 10:05:36 (GMT) |
commit | a7dc0a46e08d590ade80fe91a26f6a7d6c566f4a (patch) | |
tree | 91b235b091b4b7560da160a7aaef1732baa5f706 /src/gui | |
parent | 67ac68f4518b15d97d39d978294845c6b7956794 (diff) | |
download | Qt-a7dc0a46e08d590ade80fe91a26f6a7d6c566f4a.zip Qt-a7dc0a46e08d590ade80fe91a26f6a7d6c566f4a.tar.gz Qt-a7dc0a46e08d590ade80fe91a26f6a7d6c566f4a.tar.bz2 |
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')
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 70f3d94..f005732 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]; } |