macOS fix for "Fl_Window::cursor(...) does not work reliably on some platforms" (#1082)

This commit is contained in:
ManoloFLTK 2024-10-04 23:38:33 +02:00
parent e9a8853aa4
commit b1693b41f4

View File

@ -2548,9 +2548,9 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
// We have to have at least one cursor rect for invalidateCursorRectsForView
// to work, hence the "else" clause.
if (i->cursor)
[self addCursorRect:[self visibleRect] cursor:(NSCursor*)i->cursor];
[self addCursorRect:[self frame] cursor:(NSCursor*)i->cursor];
else
[self addCursorRect:[self visibleRect] cursor:[NSCursor arrowCursor]];
[self addCursorRect:[self frame] cursor:[NSCursor arrowCursor]];
}
- (void)mouseUp:(NSEvent *)theEvent {
cocoaMouseHandler(theEvent);