{"action":"created","comment":{"url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls/comments/49907391","id":49907391,"diff_hunk":"@@ -255,4 +258,53 @@ bool AEEditorCommon::ReadPreferences()\n     return true;\n }\n \n+void AEEditorCommon::ValidateWindow()\n+{\n+    Graphics* graphics = GetSubsystem<Graphics>();\n+    IntVector2 windowPosition = graphics->GetWindowPosition();\n+    int monitors = graphics->GetMonitorsNumber();\n+    IntVector2 maxResolution;\n+\n+    for (int i = 0; i < monitors; i++)\n+    {\n+        IntVector2 monitorResolution = graphics->GetMonitorResolution(i);\n+        maxResolution += monitorResolution;\n+    }\n+\n+    if (windowPosition.x_ >= maxResolution.x_ || windowPosition.y_ >= maxResolution.y_ || windowPosition.x_ < 0 || windowPosition.y_ < 0)\n+    {\n+        bool editor = this->GetTypeName() == \"AEEditorApp\";","path":"Source/AtomicEditor/Application/AEEditorCommon.cpp","position":36,"original_position":36,"commit_id":"0c73ad7927f0c9d131a47e7a6c20b8756a4c9225","original_commit_id":"0c73ad7927f0c9d131a47e7a6c20b8756a4c9225","user":{"login":"JoshEngebretson","id":376203,"avatar_url":"https://avatars.githubusercontent.com/u/376203?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshEngebretson","html_url":"https://github.com/JoshEngebretson","followers_url":"https://api.github.com/users/JoshEngebretson/followers","following_url":"https://api.github.com/users/JoshEngebretson/following{/other_user}","gists_url":"https://api.github.com/users/JoshEngebretson/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshEngebretson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshEngebretson/subscriptions","organizations_url":"https://api.github.com/users/JoshEngebretson/orgs","repos_url":"https://api.github.com/users/JoshEngebretson/repos","events_url":"https://api.github.com/users/JoshEngebretson/events{/privacy}","received_events_url":"https://api.github.com/users/JoshEngebretson/received_events","type":"User","site_admin":false},"body":"Better to use context_->GetEditorContext()\r\n\r\nhttps://github.com/AtomicGameEngine/AtomicGameEngine/blob/master/Source/Atomic/Core/Context.h#L120","created_at":"2016-01-15T21:30:12Z","updated_at":"2016-01-15T21:30:12Z","html_url":"https://github.com/AtomicGameEngine/AtomicGameEngine/pull/611#discussion_r49907391","pull_request_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls/611","_links":{"self":{"href":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls/comments/49907391"},"html":{"href":"https://github.com/AtomicGameEngine/AtomicGameEngine/pull/611#discussion_r49907391"},"pull_request":{"href":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls/611"}}},"pull_request":{"url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls/611","id":56204506,"html_url":"https://github.com/AtomicGameEngine/AtomicGameEngine/pull/611","diff_url":"https://github.com/AtomicGameEngine/AtomicGameEngine/pull/611.diff","patch_url":"https://github.com/AtomicGameEngine/AtomicGameEngine/pull/611.patch","issue_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/issues/611","number":611,"state":"open","locked":false,"title":"Center window if it's outside of desktop resolution","user":{"login":"rsredsq","id":5163918,"avatar_url":"https://avatars.githubusercontent.com/u/5163918?v=3","gravatar_id":"","url":"https://api.github.com/users/rsredsq","html_url":"https://github.com/rsredsq","followers_url":"https://api.github.com/users/rsredsq/followers","following_url":"https://api.github.com/users/rsredsq/following{/other_user}","gists_url":"https://api.github.com/users/rsredsq/gists{/gist_id}","starred_url":"https://api.github.com/users/rsredsq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsredsq/subscriptions","organizations_url":"https://api.github.com/users/rsredsq/orgs","repos_url":"https://api.github.com/users/rsredsq/repos","events_url":"https://api.github.com/users/rsredsq/events{/privacy}","received_events_url":"https://api.github.com/users/rsredsq/received_events","type":"User","site_admin":false},"body":"#599 ","created_at":"2016-01-15T18:32:46Z","updated_at":"2016-01-15T21:30:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"11fc31294b89193b380fd32184c1831228625554","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls/611/commits","review_comments_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls/611/comments","review_comment_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/issues/611/comments","statuses_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/statuses/0c73ad7927f0c9d131a47e7a6c20b8756a4c9225","head":{"label":"rsredsq:RED-EDITOR-599","ref":"RED-EDITOR-599","sha":"0c73ad7927f0c9d131a47e7a6c20b8756a4c9225","user":{"login":"rsredsq","id":5163918,"avatar_url":"https://avatars.githubusercontent.com/u/5163918?v=3","gravatar_id":"","url":"https://api.github.com/users/rsredsq","html_url":"https://github.com/rsredsq","followers_url":"https://api.github.com/users/rsredsq/followers","following_url":"https://api.github.com/users/rsredsq/following{/other_user}","gists_url":"https://api.github.com/users/rsredsq/gists{/gist_id}","starred_url":"https://api.github.com/users/rsredsq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsredsq/subscriptions","organizations_url":"https://api.github.com/users/rsredsq/orgs","repos_url":"https://api.github.com/users/rsredsq/repos","events_url":"https://api.github.com/users/rsredsq/events{/privacy}","received_events_url":"https://api.github.com/users/rsredsq/received_events","type":"User","site_admin":false},"repo":{"id":40023276,"name":"AtomicGameEngine","full_name":"rsredsq/AtomicGameEngine","owner":{"login":"rsredsq","id":5163918,"avatar_url":"https://avatars.githubusercontent.com/u/5163918?v=3","gravatar_id":"","url":"https://api.github.com/users/rsredsq","html_url":"https://github.com/rsredsq","followers_url":"https://api.github.com/users/rsredsq/followers","following_url":"https://api.github.com/users/rsredsq/following{/other_user}","gists_url":"https://api.github.com/users/rsredsq/gists{/gist_id}","starred_url":"https://api.github.com/users/rsredsq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsredsq/subscriptions","organizations_url":"https://api.github.com/users/rsredsq/orgs","repos_url":"https://api.github.com/users/rsredsq/repos","events_url":"https://api.github.com/users/rsredsq/events{/privacy}","received_events_url":"https://api.github.com/users/rsredsq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rsredsq/AtomicGameEngine","description":"The Atomic Game Engine: http://www.AtomicGameEngine.com","fork":true,"url":"https://api.github.com/repos/rsredsq/AtomicGameEngine","forks_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/forks","keys_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/teams","hooks_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/hooks","issue_events_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/issues/events{/number}","events_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/events","assignees_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/assignees{/user}","branches_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/branches{/branch}","tags_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/tags","blobs_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/git/refs{/sha}","trees_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/statuses/{sha}","languages_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/languages","stargazers_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/stargazers","contributors_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/contributors","subscribers_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/subscribers","subscription_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/subscription","commits_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/commits{/sha}","git_commits_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/git/commits{/sha}","comments_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/comments{/number}","issue_comment_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/issues/comments{/number}","contents_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/contents/{+path}","compare_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/merges","archive_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/downloads","issues_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/issues{/number}","pulls_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/pulls{/number}","milestones_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/milestones{/number}","notifications_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/labels{/name}","releases_url":"https://api.github.com/repos/rsredsq/AtomicGameEngine/releases{/id}","created_at":"2015-07-31T20:19:23Z","updated_at":"2016-01-13T10:02:14Z","pushed_at":"2016-01-15T21:09:01Z","git_url":"git://github.com/rsredsq/AtomicGameEngine.git","ssh_url":"git@github.com:rsredsq/AtomicGameEngine.git","clone_url":"https://github.com/rsredsq/AtomicGameEngine.git","svn_url":"https://github.com/rsredsq/AtomicGameEngine","homepage":"","size":157076,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"AtomicGameEngine:master","ref":"master","sha":"85e39606cca870a6b04ee0c75a3ae6f9bb7e0bf7","user":{"login":"AtomicGameEngine","id":9641691,"avatar_url":"https://avatars.githubusercontent.com/u/9641691?v=3","gravatar_id":"","url":"https://api.github.com/users/AtomicGameEngine","html_url":"https://github.com/AtomicGameEngine","followers_url":"https://api.github.com/users/AtomicGameEngine/followers","following_url":"https://api.github.com/users/AtomicGameEngine/following{/other_user}","gists_url":"https://api.github.com/users/AtomicGameEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/AtomicGameEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtomicGameEngine/subscriptions","organizations_url":"https://api.github.com/users/AtomicGameEngine/orgs","repos_url":"https://api.github.com/users/AtomicGameEngine/repos","events_url":"https://api.github.com/users/AtomicGameEngine/events{/privacy}","received_events_url":"https://api.github.com/users/AtomicGameEngine/received_events","type":"Organization","site_admin":false},"repo":{"id":29790707,"name":"AtomicGameEngine","full_name":"AtomicGameEngine/AtomicGameEngine","owner":{"login":"AtomicGameEngine","id":9641691,"avatar_url":"https://avatars.githubusercontent.com/u/9641691?v=3","gravatar_id":"","url":"https://api.github.com/users/AtomicGameEngine","html_url":"https://github.com/AtomicGameEngine","followers_url":"https://api.github.com/users/AtomicGameEngine/followers","following_url":"https://api.github.com/users/AtomicGameEngine/following{/other_user}","gists_url":"https://api.github.com/users/AtomicGameEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/AtomicGameEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtomicGameEngine/subscriptions","organizations_url":"https://api.github.com/users/AtomicGameEngine/orgs","repos_url":"https://api.github.com/users/AtomicGameEngine/repos","events_url":"https://api.github.com/users/AtomicGameEngine/events{/privacy}","received_events_url":"https://api.github.com/users/AtomicGameEngine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AtomicGameEngine/AtomicGameEngine","description":"The Atomic Game Engine: http://www.AtomicGameEngine.com","fork":false,"url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine","forks_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/forks","keys_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/teams","hooks_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/hooks","issue_events_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/issues/events{/number}","events_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/events","assignees_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/assignees{/user}","branches_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/branches{/branch}","tags_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/tags","blobs_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/git/refs{/sha}","trees_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/statuses/{sha}","languages_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/languages","stargazers_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/stargazers","contributors_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/contributors","subscribers_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/subscribers","subscription_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/subscription","commits_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/commits{/sha}","git_commits_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/git/commits{/sha}","comments_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/comments{/number}","issue_comment_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/issues/comments{/number}","contents_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/contents/{+path}","compare_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/merges","archive_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/downloads","issues_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/issues{/number}","pulls_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls{/number}","milestones_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/milestones{/number}","notifications_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/labels{/name}","releases_url":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/releases{/id}","created_at":"2015-01-24T20:35:25Z","updated_at":"2016-01-14T07:26:27Z","pushed_at":"2016-01-15T21:08:46Z","git_url":"git://github.com/AtomicGameEngine/AtomicGameEngine.git","ssh_url":"git@github.com:AtomicGameEngine/AtomicGameEngine.git","clone_url":"https://github.com/AtomicGameEngine/AtomicGameEngine.git","svn_url":"https://github.com/AtomicGameEngine/AtomicGameEngine","homepage":"","size":80109,"stargazers_count":303,"watchers_count":303,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":208,"forks":56,"open_issues":208,"watchers":303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls/611"},"html":{"href":"https://github.com/AtomicGameEngine/AtomicGameEngine/pull/611"},"issue":{"href":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/issues/611"},"comments":{"href":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/issues/611/comments"},"review_comments":{"href":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls/611/comments"},"review_comment":{"href":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/pulls/611/commits"},"statuses":{"href":"https://api.github.com/repos/AtomicGameEngine/AtomicGameEngine/statuses/0c73ad7927f0c9d131a47e7a6c20b8756a4c9225"}}}}