Browse Source

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

pull/1081/head
ManoloFLTK 8 months ago
parent
commit
ea80a31266
  1. 4
      src/Fl_cocoa.mm

4
src/Fl_cocoa.mm

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

Loading…
Cancel
Save