diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2010-02-10 15:50:55 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2010-02-10 15:50:55 (GMT) |
commit | 1b0c7a43624f378619ba4b5cc33fa3bfe4f531ed (patch) | |
tree | c22f6a63c2911d52ecc11aec8662d2f682d6afda /src/gui/kernel/qwidget_mac.mm | |
parent | 492f1f4267074525e33fb8571c12d520e92163a6 (diff) | |
parent | b7af368e86874d71ffc9071c9ef009814d6a3467 (diff) | |
download | Qt-1b0c7a43624f378619ba4b5cc33fa3bfe4f531ed.zip Qt-1b0c7a43624f378619ba4b5cc33fa3bfe4f531ed.tar.gz Qt-1b0c7a43624f378619ba4b5cc33fa3bfe4f531ed.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 878b776..a5633d3 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -565,6 +565,25 @@ inline static void qt_mac_set_window_group_to_popup(OSWindowRef window) } #endif +#ifdef QT_MAC_USE_COCOA +void qt_mac_set_needs_display(QWidget *widget, QRegion region) +{ + NSView *theNSView = qt_mac_nativeview_for(widget); + if (region.isEmpty()) { + [theNSView setNeedsDisplay:YES]; + return; + } + + QVector<QRect> rects = region.rects(); + for (int i = 0; i<rects.count(); ++i) { + const QRect &rect = rects.at(i); + NSRect nsrect = NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height()); + [theNSView setNeedsDisplayInRect:nsrect]; + } + +} +#endif + inline static bool updateRedirectedToGraphicsProxyWidget(QWidget *widget, const QRect &rect) { if (!widget) |