From 5451a1178deb499cad55a12ce2b9a43f566f8f27 Mon Sep 17 00:00:00 2001 From: Marius Petcu Date: Mon, 2 Nov 2020 11:10:02 +0200 Subject: [PATCH] Make sure cursor hides properly on macOS --- defos/src/defos_mac.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/defos/src/defos_mac.mm b/defos/src/defos_mac.mm index db0056a..061928c 100644 --- a/defos/src/defos_mac.mm +++ b/defos/src/defos_mac.mm @@ -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 {