subsoap/defos

hide cursor not working on mac

rsaienz opened this issue · 2 comments

In the init function of the unique script attached to the bootstrap collection I have the following lines:
defos.set_window_title("Jack Redrum")
defos.set_fullscreen(true)
defos.set_cursor_visible(false)
When I run the game on Mac, I see that: (1) the window title is set, (2) fullscreen mode is entered but (3) the cursor IS still visible. I have also tried in windowed mode but the cursor is always visible.

EDIT: sometimes in fullscreen the cursor is not visible… I don’t understand…

EDIT2: I have changed nothing, but now the cursor is NOT visible… and I cannot reproduce the issue.

I think I am able to reproduce the issue:

  1. insert the fullscreen request in the init code as above

  2. start the app (the cursor is not visible)

  3. move the mouse to the top of the screen (also if you don't see it)

  4. click and the window buttons appear

  5. click again if the mouse is still not visible

  6. toggle fullscreen with the green window button

  7. now change the code and leave the app in windowed mode at startup

  8. start the app and the cursor IS visible.

I reproduced it in a slightly different way (by clicking on the top bar, which makes the cursor show again, then clicking back into the game, where the cursor should hide again, but that doesn't happen). I added a workaround and I'll soon make a new release.