From a7dc0a46e08d590ade80fe91a26f6a7d6c566f4a Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Fri, 9 Apr 2010 12:41:11 +0200 Subject: Force the repaint during a window resize. Reviewed-by: Morten Sorvig Task-number: QTBUG-6384 (cherry picked from commit 3aee7881eaa45d4cbc1d0a353772cbf44638dadc) --- src/gui/kernel/qwidget_mac.mm | 5 +++-- 1 file 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]; } -- cgit v0.12