diff options
author | Carlos Manuel Duclos Vergara <carlos.duclos@nokia.com> | 2010-03-02 09:24:41 (GMT) |
---|---|---|
committer | Carlos Manuel Duclos Vergara <carlos.duclos@nokia.com> | 2010-03-02 09:24:41 (GMT) |
commit | 2d0e06a495b5c5a723997eef9618fdd7a7bc98b1 (patch) | |
tree | d090b23ae66ae00abb84ecebab8f6304516639cc /src | |
parent | a433a46e4aa726185272d66069e6d9b7c8ab9cf8 (diff) | |
download | Qt-2d0e06a495b5c5a723997eef9618fdd7a7bc98b1.zip Qt-2d0e06a495b5c5a723997eef9618fdd7a7bc98b1.tar.gz Qt-2d0e06a495b5c5a723997eef9618fdd7a7bc98b1.tar.bz2 |
Carbon : Setting palette brush to a pixmap does not work.
The problem occurs because we were drawing the pixmap and then clearing
the buffer. This patch basically moves the clearing of the buffer to
the start of the process instead of having it in the middle.
Task-number: QTBUG-7800
Reviewed-by: Morten Sorvig
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index f78596e..c7acf69 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -1268,6 +1268,11 @@ OSStatus QWidgetPrivate::qt_widget_event(EventHandlerCallRef er, EventRef event, if (widget->isVisible() && widget->updatesEnabled()) { //process the actual paint event. if(widget->testAttribute(Qt::WA_WState_InPaintEvent)) qWarning("QWidget::repaint: Recursive repaint detected"); + if (widget->isWindow() && !widget->d_func()->isOpaque + && !widget->testAttribute(Qt::WA_MacBrushedMetal)) { + QRect qrgnRect = qrgn.boundingRect(); + CGContextClearRect(cg, CGRectMake(qrgnRect.x(), qrgnRect.y(), qrgnRect.width(), qrgnRect.height())); + } QPoint redirectionOffset(0, 0); QWidget *tl = widget->window(); @@ -1318,13 +1323,6 @@ OSStatus QWidgetPrivate::qt_widget_event(EventHandlerCallRef er, EventRef event, widget->d_func()->restoreRedirected(); } - if (widget->isWindow() && !widget->d_func()->isOpaque - && !widget->testAttribute(Qt::WA_MacBrushedMetal)) { - QRect qrgnRect = qrgn.boundingRect(); - CGContextClearRect(cg, CGRectMake(qrgnRect.x(), qrgnRect.y(), qrgnRect.width(), qrgnRect.height())); - } - - if(!HIObjectIsOfClass((HIObjectRef)hiview, kObjectQWidget)) CallNextEventHandler(er, event); |