This commit is contained in:
kleuter 2016-03-23 17:46:38 +01:00
parent 72bb4aa9af
commit 1b52b8e2c1

View File

@ -920,8 +920,18 @@ QT_WARNING_POP
-(void)resetCursorRects -(void)resetCursorRects
{ {
// Use the cursor rect API if there is a NSWindow // Use the cursor rect API if there is a NSWindow
if (m_platformWindow->m_nsWindow && m_platformWindow->m_windowCursor) using QNSV = QT_MANGLE_NAMESPACE(QNSView);
[self addCursorRect:[self visibleRect] cursor:m_platformWindow->m_windowCursor];
NSWindow *win = m_platformWindow->m_nsWindow;
NSView *pv = self.superview;
for (; !win && [pv isKindOfClass:[QNSV class]]; pv = pv.superview) {
auto platformWindow = static_cast<QNSV *>(pv)->m_platformWindow;
if (platformWindow)
win = platformWindow->m_nsWindow;
}
if (win && m_platformWindow->m_windowCursor)
[self addCursorRect:[self visibleRect] cursor:m_platformWindow->m_windowCursor];
} }
- (void)mouseMovedImpl:(NSEvent *)theEvent - (void)mouseMovedImpl:(NSEvent *)theEvent