{"action":"created","issue":{"url":"https://api.github.com/repos/ggez/ggez/issues/465","repository_url":"https://api.github.com/repos/ggez/ggez","labels_url":"https://api.github.com/repos/ggez/ggez/issues/465/labels{/name}","comments_url":"https://api.github.com/repos/ggez/ggez/issues/465/comments","events_url":"https://api.github.com/repos/ggez/ggez/issues/465/events","html_url":"https://github.com/ggez/ggez/issues/465","id":352210726,"node_id":"MDU6SXNzdWUzNTIyMTA3MjY=","number":465,"title":"Initial mouse position, without a single mouse move event","user":{"login":"elszben","id":4603999,"node_id":"MDQ6VXNlcjQ2MDM5OTk=","avatar_url":"https://avatars3.githubusercontent.com/u/4603999?v=4","gravatar_id":"","url":"https://api.github.com/users/elszben","html_url":"https://github.com/elszben","followers_url":"https://api.github.com/users/elszben/followers","following_url":"https://api.github.com/users/elszben/following{/other_user}","gists_url":"https://api.github.com/users/elszben/gists{/gist_id}","starred_url":"https://api.github.com/users/elszben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elszben/subscriptions","organizations_url":"https://api.github.com/users/elszben/orgs","repos_url":"https://api.github.com/users/elszben/repos","events_url":"https://api.github.com/users/elszben/events{/privacy}","received_events_url":"https://api.github.com/users/elszben/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-20T16:35:45Z","updated_at":"2018-08-21T21:38:23Z","closed_at":null,"author_association":"NONE","body":"I can't seem to find a way to get the mouse position in a windowed app properly (did not test it in full screen, it may work there properly). The eventhandler's mouse events work properly but they only happen if the user actually moves the cursor after the app is started. If the user does not move the cursor, no event is generated and the get_position() function also returns 0,0. I even tried to query it in focus_event but get_position() gives the same result there as well. Other solution would be to query it in every single draw and/or update but that seems silly. What am I doing wrong? What's the proper method?\r\n\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/ggez/ggez/issues/comments/414830246","html_url":"https://github.com/ggez/ggez/issues/465#issuecomment-414830246","issue_url":"https://api.github.com/repos/ggez/ggez/issues/465","id":414830246,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDgzMDI0Ng==","user":{"login":"icefoxen","id":1335133,"node_id":"MDQ6VXNlcjEzMzUxMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/1335133?v=4","gravatar_id":"","url":"https://api.github.com/users/icefoxen","html_url":"https://github.com/icefoxen","followers_url":"https://api.github.com/users/icefoxen/followers","following_url":"https://api.github.com/users/icefoxen/following{/other_user}","gists_url":"https://api.github.com/users/icefoxen/gists{/gist_id}","starred_url":"https://api.github.com/users/icefoxen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icefoxen/subscriptions","organizations_url":"https://api.github.com/users/icefoxen/orgs","repos_url":"https://api.github.com/users/icefoxen/repos","events_url":"https://api.github.com/users/icefoxen/events{/privacy}","received_events_url":"https://api.github.com/users/icefoxen/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T21:38:23Z","updated_at":"2018-08-21T21:38:23Z","author_association":"CONTRIBUTOR","body":"SDL2 does not store absolute mouse position, you only are notified of its position in events when the mouse moves, via the `MouseMotion` event type.  So I'm not sure there is a way to ask what the mouse position is before there's an event."}}
{"actor":{"display_login":"icefoxen"}}