mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2024-11-22 19:00:04 +08:00
This commit is contained in:
parent
72bb4aa9af
commit
1b52b8e2c1
@ -920,8 +920,18 @@ QT_WARNING_POP
|
||||
-(void)resetCursorRects
|
||||
{
|
||||
// Use the cursor rect API if there is a NSWindow
|
||||
if (m_platformWindow->m_nsWindow && m_platformWindow->m_windowCursor)
|
||||
[self addCursorRect:[self visibleRect] cursor: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];
|
||||
}
|
||||
|
||||
- (void)mouseMovedImpl:(NSEvent *)theEvent
|
||||
|
Loading…
Reference in New Issue
Block a user