mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2024-11-26 04:31:39 +08:00
This commit is contained in:
parent
72bb4aa9af
commit
1b52b8e2c1
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user