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

View File

@ -920,7 +920,17 @@ 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);
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]; [self addCursorRect:[self visibleRect] cursor:m_platformWindow->m_windowCursor];
} }