diff options
author | Carlos Manuel Duclos Vergara <carlos.duclos@nokia.com> | 2010-03-17 11:09:03 (GMT) |
---|---|---|
committer | Carlos Manuel Duclos Vergara <carlos.duclos@nokia.com> | 2010-03-17 11:16:49 (GMT) |
commit | f8d5f2594a9b268b9eeecf95b24b23fc940c71ce (patch) | |
tree | 8477e02f4cd88ca9ddbb58f6cc3d7a455253d8f5 /src/gui/kernel | |
parent | c8b999d9d1eaf3379233169ccd4e9ea8c86a1702 (diff) | |
download | Qt-f8d5f2594a9b268b9eeecf95b24b23fc940c71ce.zip Qt-f8d5f2594a9b268b9eeecf95b24b23fc940c71ce.tar.gz Qt-f8d5f2594a9b268b9eeecf95b24b23fc940c71ce.tar.bz2 |
Cocoa: minisplitter has only 1px wide grab area
The problem was that in Cocoa we were ignoring the WA_MouseNoMask
attribute, therefore the mask was being applied to the mouse movements.
This in turn caused the cursor not to change accordingly.
Task-number: QTCREATORBUG-361
Reviewed-by: Prasanth
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 4f71681..a627616 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -241,7 +241,8 @@ static int qCocoaViewCount = 0; QRegion mask = qt_widget_private(cursorWidget)->extra->mask; NSCursor *nscursor = static_cast<NSCursor *>(qt_mac_nsCursorForQCursor(cursorWidget->cursor())); - if (mask.isEmpty()) { + // The mask could have the WA_MouseNoMask attribute set and that means that we have to ignore the mask. + if (mask.isEmpty() || cursorWidget->testAttribute(Qt::WA_MouseNoMask)) { [self addCursorRect:[qt_mac_nativeview_for(cursorWidget) visibleRect] cursor:nscursor]; } else { const QVector<QRect> &rects = mask.rects(); @@ -490,7 +491,9 @@ static int qCocoaViewCount = 0; CGContextRef cg = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; qwidgetprivate->hd = cg; CGContextSaveGState(cg); - + CGFloat components[] = {1,0,0,1}; + CGContextSetFillColor(cg, components); + CGContextFillRect(cg, aRect); if (qwidget->isVisible() && qwidget->updatesEnabled()) { //process the actual paint event. if (qwidget->testAttribute(Qt::WA_WState_InPaintEvent)) qWarning("QWidget::repaint: Recursive repaint detected"); |