{"action":"created","comment":{"url":"https://api.github.com/repos/SirCmpwn/sway/pulls/comments/57772843","id":57772843,"diff_hunk":"@@ -344,13 +349,13 @@ static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geo\n \t\tview->desired_width = geometry->size.w;\n \t\tview->desired_height = geometry->size.h;\n \n-\t\tif (view->is_floating) {\n-\t\t\tview->width = view->desired_width;\n-\t\t\tview->height = view->desired_height;\n-\t\t\tview->x = geometry->origin.x;\n-\t\t\tview->y = geometry->origin.y;\n-\t\t\tarrange_windows(view->parent, -1, -1);\n-\t\t}\n+\t\t/* if (view->is_floating) { */\n+\t\t/* \tview->width = view->desired_width; */\n+\t\t/* \tview->height = view->desired_height; */\n+\t\t/* \tview->x = geometry->origin.x; */\n+\t\t/* \tview->y = geometry->origin.y; */\n+\t\t/* /1* \tarrange_windows(view->parent, -1, -1); *1/ */\n+\t\t/* } */","path":"sway/handlers.c","position":36,"original_position":36,"commit_id":"2772ac609b25726b3793ec12d96118db8ddef223","original_commit_id":"2772ac609b25726b3793ec12d96118db8ddef223","user":{"login":"mikkeloscar","id":128566,"avatar_url":"https://avatars.githubusercontent.com/u/128566?v=3","gravatar_id":"","url":"https://api.github.com/users/mikkeloscar","html_url":"https://github.com/mikkeloscar","followers_url":"https://api.github.com/users/mikkeloscar/followers","following_url":"https://api.github.com/users/mikkeloscar/following{/other_user}","gists_url":"https://api.github.com/users/mikkeloscar/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkeloscar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkeloscar/subscriptions","organizations_url":"https://api.github.com/users/mikkeloscar/orgs","repos_url":"https://api.github.com/users/mikkeloscar/repos","events_url":"https://api.github.com/users/mikkeloscar/events{/privacy}","received_events_url":"https://api.github.com/users/mikkeloscar/received_events","type":"User","site_admin":false},"body":"It's commented out for that reason, I didn't know what it might break to remove it. The issue is that arrange_windows calls wlc_view_set_geometry at some point and a call to `wlc_view_set_geometry` triggers the `handle_view_geometry_request`, so you end up with the bug described in: #487 and this bug appeared with all floating windows with the border code.\r\n\r\nNow I know what it might break, so I can investigate. thanks :)","created_at":"2016-03-29T18:17:12Z","updated_at":"2016-03-29T18:17:12Z","html_url":"https://github.com/SirCmpwn/sway/pull/551#discussion_r57772843","pull_request_url":"https://api.github.com/repos/SirCmpwn/sway/pulls/551","_links":{"self":{"href":"https://api.github.com/repos/SirCmpwn/sway/pulls/comments/57772843"},"html":{"href":"https://github.com/SirCmpwn/sway/pull/551#discussion_r57772843"},"pull_request":{"href":"https://api.github.com/repos/SirCmpwn/sway/pulls/551"}}},"pull_request":{"url":"https://api.github.com/repos/SirCmpwn/sway/pulls/551","id":64497654,"html_url":"https://github.com/SirCmpwn/sway/pull/551","diff_url":"https://github.com/SirCmpwn/sway/pull/551.diff","patch_url":"https://github.com/SirCmpwn/sway/pull/551.patch","issue_url":"https://api.github.com/repos/SirCmpwn/sway/issues/551","number":551,"state":"open","locked":false,"title":"Implement Window borders","user":{"login":"mikkeloscar","id":128566,"avatar_url":"https://avatars.githubusercontent.com/u/128566?v=3","gravatar_id":"","url":"https://api.github.com/users/mikkeloscar","html_url":"https://github.com/mikkeloscar","followers_url":"https://api.github.com/users/mikkeloscar/followers","following_url":"https://api.github.com/users/mikkeloscar/following{/other_user}","gists_url":"https://api.github.com/users/mikkeloscar/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkeloscar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkeloscar/subscriptions","organizations_url":"https://api.github.com/users/mikkeloscar/orgs","repos_url":"https://api.github.com/users/mikkeloscar/repos","events_url":"https://api.github.com/users/mikkeloscar/events{/privacy}","received_events_url":"https://api.github.com/users/mikkeloscar/received_events","type":"User","site_admin":false},"body":"### Implementation\r\n\r\nThe borders are implemented as a surface/buffer attached to each view\r\nwhich is sent to and rendered by wlc in the view_pre_render callback.\r\n\r\nAll the drawing logic is handled in sway/border.c and all the logic for\r\ncalculating the geometry of the border/view is handled in\r\n`update_geometry` in sway/layout.c (same place as gaps are calculated).\r\n\r\nIncluded are also support for `border <none|normal|pixel|toggle>` options and `hide_edge_borders <none|vertical|horizontal|both>`.\r\n\r\n##### Not included:\r\nParsing of custom border colors. This needs to be implemented in the config: http://i3wm.org/docs/userguide.html#_changing_colors.\r\n\r\n#### Known issues\r\n* [ ] The colors are currently dependent on a little-endian cpu to be correct (discussing [here](https://github.com/Cloudef/wlc/issues/142#issuecomment-202886577)). This needs to be corrected before merge. I suggest we just do a runtime check of endianness and format the colors based on that unless someone has a better idea.\r\n* Moving a floating window off the edge off the screen will confuse the border rendering. It's because wlc clamps the geometry, so we just need to send the right part of the border in those cases (haven't bothered with this yet).\r\n* The title does not change. I don't know if wlc provides a way to get the current window title, haven't looked into it.\r\n* Borders on current windows does not change if you reload the config with a new border config. (Just need to check all views and update those needed, haven't bothered with this yet either).","created_at":"2016-03-29T16:53:18Z","updated_at":"2016-03-29T18:17:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd0ec0ce4c9bfd70d2137b95224ab77e37c9551d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SirCmpwn/sway/pulls/551/commits","review_comments_url":"https://api.github.com/repos/SirCmpwn/sway/pulls/551/comments","review_comment_url":"https://api.github.com/repos/SirCmpwn/sway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SirCmpwn/sway/issues/551/comments","statuses_url":"https://api.github.com/repos/SirCmpwn/sway/statuses/2772ac609b25726b3793ec12d96118db8ddef223","head":{"label":"mikkeloscar:window-borders","ref":"window-borders","sha":"2772ac609b25726b3793ec12d96118db8ddef223","user":{"login":"mikkeloscar","id":128566,"avatar_url":"https://avatars.githubusercontent.com/u/128566?v=3","gravatar_id":"","url":"https://api.github.com/users/mikkeloscar","html_url":"https://github.com/mikkeloscar","followers_url":"https://api.github.com/users/mikkeloscar/followers","following_url":"https://api.github.com/users/mikkeloscar/following{/other_user}","gists_url":"https://api.github.com/users/mikkeloscar/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkeloscar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkeloscar/subscriptions","organizations_url":"https://api.github.com/users/mikkeloscar/orgs","repos_url":"https://api.github.com/users/mikkeloscar/repos","events_url":"https://api.github.com/users/mikkeloscar/events{/privacy}","received_events_url":"https://api.github.com/users/mikkeloscar/received_events","type":"User","site_admin":false},"repo":{"id":41923603,"name":"sway","full_name":"mikkeloscar/sway","owner":{"login":"mikkeloscar","id":128566,"avatar_url":"https://avatars.githubusercontent.com/u/128566?v=3","gravatar_id":"","url":"https://api.github.com/users/mikkeloscar","html_url":"https://github.com/mikkeloscar","followers_url":"https://api.github.com/users/mikkeloscar/followers","following_url":"https://api.github.com/users/mikkeloscar/following{/other_user}","gists_url":"https://api.github.com/users/mikkeloscar/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkeloscar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkeloscar/subscriptions","organizations_url":"https://api.github.com/users/mikkeloscar/orgs","repos_url":"https://api.github.com/users/mikkeloscar/repos","events_url":"https://api.github.com/users/mikkeloscar/events{/privacy}","received_events_url":"https://api.github.com/users/mikkeloscar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikkeloscar/sway","description":"i3-compatible window manager for Wayland (WIP)","fork":true,"url":"https://api.github.com/repos/mikkeloscar/sway","forks_url":"https://api.github.com/repos/mikkeloscar/sway/forks","keys_url":"https://api.github.com/repos/mikkeloscar/sway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikkeloscar/sway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikkeloscar/sway/teams","hooks_url":"https://api.github.com/repos/mikkeloscar/sway/hooks","issue_events_url":"https://api.github.com/repos/mikkeloscar/sway/issues/events{/number}","events_url":"https://api.github.com/repos/mikkeloscar/sway/events","assignees_url":"https://api.github.com/repos/mikkeloscar/sway/assignees{/user}","branches_url":"https://api.github.com/repos/mikkeloscar/sway/branches{/branch}","tags_url":"https://api.github.com/repos/mikkeloscar/sway/tags","blobs_url":"https://api.github.com/repos/mikkeloscar/sway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikkeloscar/sway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikkeloscar/sway/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikkeloscar/sway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikkeloscar/sway/statuses/{sha}","languages_url":"https://api.github.com/repos/mikkeloscar/sway/languages","stargazers_url":"https://api.github.com/repos/mikkeloscar/sway/stargazers","contributors_url":"https://api.github.com/repos/mikkeloscar/sway/contributors","subscribers_url":"https://api.github.com/repos/mikkeloscar/sway/subscribers","subscription_url":"https://api.github.com/repos/mikkeloscar/sway/subscription","commits_url":"https://api.github.com/repos/mikkeloscar/sway/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikkeloscar/sway/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikkeloscar/sway/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikkeloscar/sway/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikkeloscar/sway/contents/{+path}","compare_url":"https://api.github.com/repos/mikkeloscar/sway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikkeloscar/sway/merges","archive_url":"https://api.github.com/repos/mikkeloscar/sway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikkeloscar/sway/downloads","issues_url":"https://api.github.com/repos/mikkeloscar/sway/issues{/number}","pulls_url":"https://api.github.com/repos/mikkeloscar/sway/pulls{/number}","milestones_url":"https://api.github.com/repos/mikkeloscar/sway/milestones{/number}","notifications_url":"https://api.github.com/repos/mikkeloscar/sway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikkeloscar/sway/labels{/name}","releases_url":"https://api.github.com/repos/mikkeloscar/sway/releases{/id}","deployments_url":"https://api.github.com/repos/mikkeloscar/sway/deployments","created_at":"2015-09-04T15:34:29Z","updated_at":"2016-01-22T04:17:54Z","pushed_at":"2016-03-29T16:29:09Z","git_url":"git://github.com/mikkeloscar/sway.git","ssh_url":"git@github.com:mikkeloscar/sway.git","clone_url":"https://github.com/mikkeloscar/sway.git","svn_url":"https://github.com/mikkeloscar/sway","homepage":"http://swaywm.org/","size":4502,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"SirCmpwn:master","ref":"master","sha":"b7b734f311aaefba4e5760ac4feaa33631ef5111","user":{"login":"SirCmpwn","id":1310872,"avatar_url":"https://avatars.githubusercontent.com/u/1310872?v=3","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},"repo":{"id":40217904,"name":"sway","full_name":"SirCmpwn/sway","owner":{"login":"SirCmpwn","id":1310872,"avatar_url":"https://avatars.githubusercontent.com/u/1310872?v=3","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},"private":false,"html_url":"https://github.com/SirCmpwn/sway","description":"i3-compatible window manager for Wayland (WIP)","fork":false,"url":"https://api.github.com/repos/SirCmpwn/sway","forks_url":"https://api.github.com/repos/SirCmpwn/sway/forks","keys_url":"https://api.github.com/repos/SirCmpwn/sway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SirCmpwn/sway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SirCmpwn/sway/teams","hooks_url":"https://api.github.com/repos/SirCmpwn/sway/hooks","issue_events_url":"https://api.github.com/repos/SirCmpwn/sway/issues/events{/number}","events_url":"https://api.github.com/repos/SirCmpwn/sway/events","assignees_url":"https://api.github.com/repos/SirCmpwn/sway/assignees{/user}","branches_url":"https://api.github.com/repos/SirCmpwn/sway/branches{/branch}","tags_url":"https://api.github.com/repos/SirCmpwn/sway/tags","blobs_url":"https://api.github.com/repos/SirCmpwn/sway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SirCmpwn/sway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SirCmpwn/sway/git/refs{/sha}","trees_url":"https://api.github.com/repos/SirCmpwn/sway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SirCmpwn/sway/statuses/{sha}","languages_url":"https://api.github.com/repos/SirCmpwn/sway/languages","stargazers_url":"https://api.github.com/repos/SirCmpwn/sway/stargazers","contributors_url":"https://api.github.com/repos/SirCmpwn/sway/contributors","subscribers_url":"https://api.github.com/repos/SirCmpwn/sway/subscribers","subscription_url":"https://api.github.com/repos/SirCmpwn/sway/subscription","commits_url":"https://api.github.com/repos/SirCmpwn/sway/commits{/sha}","git_commits_url":"https://api.github.com/repos/SirCmpwn/sway/git/commits{/sha}","comments_url":"https://api.github.com/repos/SirCmpwn/sway/comments{/number}","issue_comment_url":"https://api.github.com/repos/SirCmpwn/sway/issues/comments{/number}","contents_url":"https://api.github.com/repos/SirCmpwn/sway/contents/{+path}","compare_url":"https://api.github.com/repos/SirCmpwn/sway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SirCmpwn/sway/merges","archive_url":"https://api.github.com/repos/SirCmpwn/sway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SirCmpwn/sway/downloads","issues_url":"https://api.github.com/repos/SirCmpwn/sway/issues{/number}","pulls_url":"https://api.github.com/repos/SirCmpwn/sway/pulls{/number}","milestones_url":"https://api.github.com/repos/SirCmpwn/sway/milestones{/number}","notifications_url":"https://api.github.com/repos/SirCmpwn/sway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SirCmpwn/sway/labels{/name}","releases_url":"https://api.github.com/repos/SirCmpwn/sway/releases{/id}","deployments_url":"https://api.github.com/repos/SirCmpwn/sway/deployments","created_at":"2015-08-05T01:31:45Z","updated_at":"2016-03-29T16:55:54Z","pushed_at":"2016-03-29T16:53:20Z","git_url":"git://github.com/SirCmpwn/sway.git","ssh_url":"git@github.com:SirCmpwn/sway.git","clone_url":"https://github.com/SirCmpwn/sway.git","svn_url":"https://github.com/SirCmpwn/sway","homepage":"http://swaywm.org/","size":4651,"stargazers_count":1200,"watchers_count":1200,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":75,"mirror_url":null,"open_issues_count":34,"forks":75,"open_issues":34,"watchers":1200,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SirCmpwn/sway/pulls/551"},"html":{"href":"https://github.com/SirCmpwn/sway/pull/551"},"issue":{"href":"https://api.github.com/repos/SirCmpwn/sway/issues/551"},"comments":{"href":"https://api.github.com/repos/SirCmpwn/sway/issues/551/comments"},"review_comments":{"href":"https://api.github.com/repos/SirCmpwn/sway/pulls/551/comments"},"review_comment":{"href":"https://api.github.com/repos/SirCmpwn/sway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SirCmpwn/sway/pulls/551/commits"},"statuses":{"href":"https://api.github.com/repos/SirCmpwn/sway/statuses/2772ac609b25726b3793ec12d96118db8ddef223"}}}}