diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-09 13:09:34 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-09 13:09:34 (GMT) |
commit | ec0f388dfb14712a144d534296b33df7e6a2df7f (patch) | |
tree | ab4d6b9da547a6439ae6f434a69ee3f202d328d7 /src/gui/kernel/qwidget_mac.mm | |
parent | 6165ab0203fa80d31f3488ead7e7f7c088c8668c (diff) | |
parent | 3b1a0c4877faa9d1d50372f2128c06530ae4b2d4 (diff) | |
download | Qt-ec0f388dfb14712a144d534296b33df7e6a2df7f.zip Qt-ec0f388dfb14712a144d534296b33df7e6a2df7f.tar.gz Qt-ec0f388dfb14712a144d534296b33df7e6a2df7f.tar.bz2 |
Merge remote branch 'qt/4.6' into qt-master-from-4.6
Conflicts:
src/gui/kernel/qcocoapanel_mac.mm
src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
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) |