Skip to content

Commit

Permalink
Make sure cursor hides properly on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
dapetcu21 committed Nov 2, 2020
1 parent 085df92 commit 5451a11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions defos/src/defos_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,10 @@ - (void)mouseEntered:(NSEvent *)event {
is_mouse_in_view = true;
if (!is_cursor_clipped) {
defos_emit_event(DEFOS_EVENT_MOUSE_ENTER);
if (!is_cursor_visible) {
[NSCursor unhide]; // Work around a macOS bug?
[NSCursor hide];
}
}
}
- (void)mouseExited:(NSEvent *)event {
Expand Down

0 comments on commit 5451a11

Please sign in to comment.