diff options
author | Fabien Freling <fabien.freling@nokia.com> | 2010-08-03 11:36:22 (GMT) |
---|---|---|
committer | Fabien Freling <fabien.freling@nokia.com> | 2010-08-03 11:36:41 (GMT) |
commit | 794c7c77f28bb530db017cc25a5e33e00933253b (patch) | |
tree | f26b48a5c03e22fe96cdbf50f93fefb4c202e594 /src | |
parent | 7fb31670f080c224249279c35240a8eb95f8d877 (diff) | |
download | Qt-794c7c77f28bb530db017cc25a5e33e00933253b.zip Qt-794c7c77f28bb530db017cc25a5e33e00933253b.tar.gz Qt-794c7c77f28bb530db017cc25a5e33e00933253b.tar.bz2 |
Fix the issue of resizing a window with the
raster engine on Mac OS X.
Reviewed-by: Richard Moe Gustavsen
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 5780ebc..3229e71 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -532,9 +532,23 @@ static int qCocoaViewCount = 0; if (!qwidget) return; + // We use a different graphics system. if (QApplicationPrivate::graphicsSystem() != 0) { - qwidget->update(qwidget->rect()); - qwidgetprivate->syncBackingStore(qwidget->rect()); + + // Qt handles the painting occuring inside the window. + // Cocoa also keeps track of all widgets as NSView and therefore might + // ask for a repainting of a widget even if Qt is already taking care of it. + // + // The only valid reason for Cocoa to call drawRect: is for window manipulation + // (ie. resize, ...). + // + // Qt will then forward the update to the children. + if (qwidget->isWindow()) { + qwidget->update(qwidget->rect()); + qwidgetprivate->syncBackingStore(qwidget->rect()); + } + + // Since we don't want to use the native engine, we must exit. return; } |