subsoap / defos

Extra native OS functions for games written using the Defold game engine
Creative Commons Zero v1.0 Universal
113 stars 15 forks source link

defos.set_cursor_locked behaves badly on windows #80

Closed subsoap closed 5 years ago

subsoap commented 6 years ago

It should not be allowed to change cursor position when window is not in focus

subsoap commented 6 years ago

Same with defos.move_cursor_to

dapetcu21 commented 6 years ago

I'm pretty sure it's bad UX to lock the user's cursor when your app is not in focus...

subsoap commented 6 years ago

Yes, I'm saying the current DefOS behavior is bad and needs to not change cursor position when game does not have focus as it currently does.

dapetcu21 commented 6 years ago

Oh, fair. You're right

subsoap commented 6 years ago

Defold devs can of course use window.set_listener to detect when game has focus or not, but I don't think we should give people the option to change mouse position when window is not in focus as the uses for it are more nefarious than legitimate.

dapetcu21 commented 6 years ago

Not to mention, many people might just not think this as a problem