{"action":"created","comment":{"url":"https://api.github.com/repos/swaywm/sway/pulls/comments/166178587","pull_request_review_id":94216644,"id":166178587,"diff_hunk":"@@ -211,42 +270,74 @@ static void handle_focus_destroy(struct wl_listener *listener, void *data) {\n }\n \n void sway_seat_set_focus(struct sway_seat *seat, swayc_t *container) {\n-\tswayc_t *last_focus = seat->focus;\n+\tswayc_t *last_focus =\n+\t\t(seat->has_focus ? sway_seat_get_focus(seat, &root_container) : NULL);","path":"sway/input/seat.c","position":98,"original_position":98,"commit_id":"515150229847c9ebdfd0cabb6f0026fca9d57a23","original_commit_id":"515150229847c9ebdfd0cabb6f0026fca9d57a23","user":{"login":"SirCmpwn","id":1310872,"avatar_url":"https://avatars0.githubusercontent.com/u/1310872?v=4","gravatar_id":"","url":"https://api.github.com/users/SirCmpwn","html_url":"https://github.com/SirCmpwn","followers_url":"https://api.github.com/users/SirCmpwn/followers","following_url":"https://api.github.com/users/SirCmpwn/following{/other_user}","gists_url":"https://api.github.com/users/SirCmpwn/gists{/gist_id}","starred_url":"https://api.github.com/users/SirCmpwn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SirCmpwn/subscriptions","organizations_url":"https://api.github.com/users/SirCmpwn/orgs","repos_url":"https://api.github.com/users/SirCmpwn/repos","events_url":"https://api.github.com/users/SirCmpwn/events{/privacy}","received_events_url":"https://api.github.com/users/SirCmpwn/received_events","type":"User","site_admin":false},"body":"Yeah seeing all of this boilerplate everywhere I am super on board with `sway_seat_get_focus` returning NULL and ditching `has_focus`","created_at":"2018-02-06T03:25:11Z","updated_at":"2018-02-06T03:25:11Z","html_url":"https://github.com/swaywm/sway/pull/1585#discussion_r166178587","pull_request_url":"https://api.github.com/repos/swaywm/sway/pulls/1585","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/swaywm/sway/pulls/comments/166178587"},"html":{"href":"https://github.com/swaywm/sway/pull/1585#discussion_r166178587"},"pull_request":{"href":"https://api.github.com/repos/swaywm/sway/pulls/1585"}}},"pull_request":{"url":"https://api.github.com/repos/swaywm/sway/pulls/1585","id":167024486,"html_url":"https://github.com/swaywm/sway/pull/1585","diff_url":"https://github.com/swaywm/sway/pull/1585.diff","patch_url":"https://github.com/swaywm/sway/pull/1585.patch","issue_url":"https://api.github.com/repos/swaywm/sway/issues/1585","number":1585,"state":"open","locked":false,"title":"[wip] focus overhaul","user":{"login":"acrisci","id":3258764,"avatar_url":"https://avatars2.githubusercontent.com/u/3258764?v=4","gravatar_id":"","url":"https://api.github.com/users/acrisci","html_url":"https://github.com/acrisci","followers_url":"https://api.github.com/users/acrisci/followers","following_url":"https://api.github.com/users/acrisci/following{/other_user}","gists_url":"https://api.github.com/users/acrisci/gists{/gist_id}","starred_url":"https://api.github.com/users/acrisci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acrisci/subscriptions","organizations_url":"https://api.github.com/users/acrisci/orgs","repos_url":"https://api.github.com/users/acrisci/repos","events_url":"https://api.github.com/users/acrisci/events{/privacy}","received_events_url":"https://api.github.com/users/acrisci/received_events","type":"User","site_admin":false},"body":"Changes:\r\n\r\nNo new features added or bugs fixed, just refactoring changes.\r\n\r\n* Keep an up-to-date list of all the containers of the seat in focus order\r\n* Add `sway_seat_get_focus` to get the \"focus inactive\" of the container (returns true focus if the seat has focus and container is the root)\r\n* Add `sway_seat_container` to store seat-specific data about a container (here, the focus stack list link and destroy handler).\r\n\r\nFeedback on the approach is welcome.","created_at":"2018-02-04T19:08:13Z","updated_at":"2018-02-06T03:25:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4265d16cb0916f3f2d62ec774e1b73973623540","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/swaywm/sway/pulls/1585/commits","review_comments_url":"https://api.github.com/repos/swaywm/sway/pulls/1585/comments","review_comment_url":"https://api.github.com/repos/swaywm/sway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swaywm/sway/issues/1585/comments","statuses_url":"https://api.github.com/repos/swaywm/sway/statuses/515150229847c9ebdfd0cabb6f0026fca9d57a23","head":{"label":"acrisci:focus-overhaul","ref":"focus-overhaul","sha":"515150229847c9ebdfd0cabb6f0026fca9d57a23","user":{"login":"acrisci","id":3258764,"avatar_url":"https://avatars2.githubusercontent.com/u/3258764?v=4","gravatar_id":"","url":"https://api.github.com/users/acrisci","html_url":"https://github.com/acrisci","followers_url":"https://api.github.com/users/acrisci/followers","following_url":"https://api.github.com/users/acrisci/following{/other_user}","gists_url":"https://api.github.com/users/acrisci/gists{/gist_id}","starred_url":"https://api.github.com/users/acrisci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acrisci/subscriptions","organizations_url":"https://api.github.com/users/acrisci/orgs","repos_url":"https://api.github.com/users/acrisci/repos","events_url":"https://api.github.com/users/acrisci/events{/privacy}","received_events_url":"https://api.github.com/users/acrisci/received_events","type":"User","site_admin":false},"repo":{"id":64037694,"name":"sway","full_name":"acrisci/sway","owner":{"login":"acrisci","id":3258764,"avatar_url":"https://avatars2.githubusercontent.com/u/3258764?v=4","gravatar_id":"","url":"https://api.github.com/users/acrisci","html_url":"https://github.com/acrisci","followers_url":"https://api.github.com/users/acrisci/followers","following_url":"https://api.github.com/users/acrisci/following{/other_user}","gists_url":"https://api.github.com/users/acrisci/gists{/gist_id}","starred_url":"https://api.github.com/users/acrisci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acrisci/subscriptions","organizations_url":"https://api.github.com/users/acrisci/orgs","repos_url":"https://api.github.com/users/acrisci/repos","events_url":"https://api.github.com/users/acrisci/events{/privacy}","received_events_url":"https://api.github.com/users/acrisci/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/acrisci/sway","description":"i3-compatible Wayland compositor","fork":true,"url":"https://api.github.com/repos/acrisci/sway","forks_url":"https://api.github.com/repos/acrisci/sway/forks","keys_url":"https://api.github.com/repos/acrisci/sway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acrisci/sway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acrisci/sway/teams","hooks_url":"https://api.github.com/repos/acrisci/sway/hooks","issue_events_url":"https://api.github.com/repos/acrisci/sway/issues/events{/number}","events_url":"https://api.github.com/repos/acrisci/sway/events","assignees_url":"https://api.github.com/repos/acrisci/sway/assignees{/user}","branches_url":"https://api.github.com/repos/acrisci/sway/branches{/branch}","tags_url":"https://api.github.com/repos/acrisci/sway/tags","blobs_url":"https://api.github.com/repos/acrisci/sway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acrisci/sway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acrisci/sway/git/refs{/sha}","trees_url":"https://api.github.com/repos/acrisci/sway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acrisci/sway/statuses/{sha}","languages_url":"https://api.github.com/repos/acrisci/sway/languages","stargazers_url":"https://api.github.com/repos/acrisci/sway/stargazers","contributors_url":"https://api.github.com/repos/acrisci/sway/contributors","subscribers_url":"https://api.github.com/repos/acrisci/sway/subscribers","subscription_url":"https://api.github.com/repos/acrisci/sway/subscription","commits_url":"https://api.github.com/repos/acrisci/sway/commits{/sha}","git_commits_url":"https://api.github.com/repos/acrisci/sway/git/commits{/sha}","comments_url":"https://api.github.com/repos/acrisci/sway/comments{/number}","issue_comment_url":"https://api.github.com/repos/acrisci/sway/issues/comments{/number}","contents_url":"https://api.github.com/repos/acrisci/sway/contents/{+path}","compare_url":"https://api.github.com/repos/acrisci/sway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acrisci/sway/merges","archive_url":"https://api.github.com/repos/acrisci/sway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acrisci/sway/downloads","issues_url":"https://api.github.com/repos/acrisci/sway/issues{/number}","pulls_url":"https://api.github.com/repos/acrisci/sway/pulls{/number}","milestones_url":"https://api.github.com/repos/acrisci/sway/milestones{/number}","notifications_url":"https://api.github.com/repos/acrisci/sway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acrisci/sway/labels{/name}","releases_url":"https://api.github.com/repos/acrisci/sway/releases{/id}","deployments_url":"https://api.github.com/repos/acrisci/sway/deployments","created_at":"2016-07-23T21:58:57Z","updated_at":"2016-07-23T21:58:58Z","pushed_at":"2018-02-04T19:09:01Z","git_url":"git://github.com/acrisci/sway.git","ssh_url":"git@github.com:acrisci/sway.git","clone_url":"https://github.com/acrisci/sway.git","svn_url":"https://github.com/acrisci/sway","homepage":"http://swaywm.org/","size":21746,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"swaywm:wlroots","ref":"wlroots","sha":"b28602aa7425cf435150e6008624429737e037d3","user":{"login":"swaywm","id":32400794,"avatar_url":"https://avatars1.githubusercontent.com/u/32400794?v=4","gravatar_id":"","url":"https://api.github.com/users/swaywm","html_url":"https://github.com/swaywm","followers_url":"https://api.github.com/users/swaywm/followers","following_url":"https://api.github.com/users/swaywm/following{/other_user}","gists_url":"https://api.github.com/users/swaywm/gists{/gist_id}","starred_url":"https://api.github.com/users/swaywm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swaywm/subscriptions","organizations_url":"https://api.github.com/users/swaywm/orgs","repos_url":"https://api.github.com/users/swaywm/repos","events_url":"https://api.github.com/users/swaywm/events{/privacy}","received_events_url":"https://api.github.com/users/swaywm/received_events","type":"Organization","site_admin":false},"repo":{"id":40217904,"name":"sway","full_name":"swaywm/sway","owner":{"login":"swaywm","id":32400794,"avatar_url":"https://avatars1.githubusercontent.com/u/32400794?v=4","gravatar_id":"","url":"https://api.github.com/users/swaywm","html_url":"https://github.com/swaywm","followers_url":"https://api.github.com/users/swaywm/followers","following_url":"https://api.github.com/users/swaywm/following{/other_user}","gists_url":"https://api.github.com/users/swaywm/gists{/gist_id}","starred_url":"https://api.github.com/users/swaywm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swaywm/subscriptions","organizations_url":"https://api.github.com/users/swaywm/orgs","repos_url":"https://api.github.com/users/swaywm/repos","events_url":"https://api.github.com/users/swaywm/events{/privacy}","received_events_url":"https://api.github.com/users/swaywm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/swaywm/sway","description":"i3-compatible Wayland compositor","fork":false,"url":"https://api.github.com/repos/swaywm/sway","forks_url":"https://api.github.com/repos/swaywm/sway/forks","keys_url":"https://api.github.com/repos/swaywm/sway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swaywm/sway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swaywm/sway/teams","hooks_url":"https://api.github.com/repos/swaywm/sway/hooks","issue_events_url":"https://api.github.com/repos/swaywm/sway/issues/events{/number}","events_url":"https://api.github.com/repos/swaywm/sway/events","assignees_url":"https://api.github.com/repos/swaywm/sway/assignees{/user}","branches_url":"https://api.github.com/repos/swaywm/sway/branches{/branch}","tags_url":"https://api.github.com/repos/swaywm/sway/tags","blobs_url":"https://api.github.com/repos/swaywm/sway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swaywm/sway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swaywm/sway/git/refs{/sha}","trees_url":"https://api.github.com/repos/swaywm/sway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swaywm/sway/statuses/{sha}","languages_url":"https://api.github.com/repos/swaywm/sway/languages","stargazers_url":"https://api.github.com/repos/swaywm/sway/stargazers","contributors_url":"https://api.github.com/repos/swaywm/sway/contributors","subscribers_url":"https://api.github.com/repos/swaywm/sway/subscribers","subscription_url":"https://api.github.com/repos/swaywm/sway/subscription","commits_url":"https://api.github.com/repos/swaywm/sway/commits{/sha}","git_commits_url":"https://api.github.com/repos/swaywm/sway/git/commits{/sha}","comments_url":"https://api.github.com/repos/swaywm/sway/comments{/number}","issue_comment_url":"https://api.github.com/repos/swaywm/sway/issues/comments{/number}","contents_url":"https://api.github.com/repos/swaywm/sway/contents/{+path}","compare_url":"https://api.github.com/repos/swaywm/sway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swaywm/sway/merges","archive_url":"https://api.github.com/repos/swaywm/sway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swaywm/sway/downloads","issues_url":"https://api.github.com/repos/swaywm/sway/issues{/number}","pulls_url":"https://api.github.com/repos/swaywm/sway/pulls{/number}","milestones_url":"https://api.github.com/repos/swaywm/sway/milestones{/number}","notifications_url":"https://api.github.com/repos/swaywm/sway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swaywm/sway/labels{/name}","releases_url":"https://api.github.com/repos/swaywm/sway/releases{/id}","deployments_url":"https://api.github.com/repos/swaywm/sway/deployments","created_at":"2015-08-05T01:31:45Z","updated_at":"2018-02-06T03:03:08Z","pushed_at":"2018-02-05T23:11:08Z","git_url":"git://github.com/swaywm/sway.git","ssh_url":"git@github.com:swaywm/sway.git","clone_url":"https://github.com/swaywm/sway.git","svn_url":"https://github.com/swaywm/sway","homepage":"http://swaywm.org/","size":21991,"stargazers_count":3424,"watchers_count":3424,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":216,"mirror_url":null,"archived":false,"open_issues_count":175,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":216,"open_issues":175,"watchers":3424,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swaywm/sway/pulls/1585"},"html":{"href":"https://github.com/swaywm/sway/pull/1585"},"issue":{"href":"https://api.github.com/repos/swaywm/sway/issues/1585"},"comments":{"href":"https://api.github.com/repos/swaywm/sway/issues/1585/comments"},"review_comments":{"href":"https://api.github.com/repos/swaywm/sway/pulls/1585/comments"},"review_comment":{"href":"https://api.github.com/repos/swaywm/sway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swaywm/sway/pulls/1585/commits"},"statuses":{"href":"https://api.github.com/repos/swaywm/sway/statuses/515150229847c9ebdfd0cabb6f0026fca9d57a23"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"SirCmpwn"}}