{"action":"created","comment":{"url":"https://api.github.com/repos/i3/i3lock/pulls/comments/63295967","id":63295967,"diff_hunk":"@@ -150,6 +150,9 @@ xcb_window_t open_fullscreen_window(xcb_connection_t *conn, xcb_screen_t *scr, c\n     values[0] = XCB_STACK_MODE_ABOVE;\n     xcb_configure_window(conn, win, XCB_CONFIG_WINDOW_STACK_MODE, values);\n \n+    /* Ensure that the window is created and set up before returning */","path":"xcb.c","position":4,"original_position":4,"commit_id":"1158c89fa24d799463253d7676c67dc095cf88f1","original_commit_id":"1158c89fa24d799463253d7676c67dc095cf88f1","user":{"login":"stapelberg","id":55506,"avatar_url":"https://avatars.githubusercontent.com/u/55506?v=3","gravatar_id":"","url":"https://api.github.com/users/stapelberg","html_url":"https://github.com/stapelberg","followers_url":"https://api.github.com/users/stapelberg/followers","following_url":"https://api.github.com/users/stapelberg/following{/other_user}","gists_url":"https://api.github.com/users/stapelberg/gists{/gist_id}","starred_url":"https://api.github.com/users/stapelberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stapelberg/subscriptions","organizations_url":"https://api.github.com/users/stapelberg/orgs","repos_url":"https://api.github.com/users/stapelberg/repos","events_url":"https://api.github.com/users/stapelberg/events{/privacy}","received_events_url":"https://api.github.com/users/stapelberg/received_events","type":"User","site_admin":false},"body":"Strictly speaking, this will only ensure that the request to create the window is sent to X11, not necessarily that the window is created before returning. For the latter, you’d need `xcb_aux_sync(conn);`, and I believe this is actually what we should be using here, if I understand the issue correctly.\r\n\r\nI think the `fork()` call marks a point where either the parent or the child process can be scheduled first. The child process opens a separate X11 connection and expects the window which the parent process created in the parent’s X11 connection using `open_fullscreen_window` to be present. Without the parent using `xcb_aux_sync(conn);`, this is not necessarily true because the X server could process the client’s new connection while the parent’s connection hasn’t even flushed out the buffered requests yet.\r\n\r\nIf I captured this correctly, could you also add that to the commit message please? I think such an intricate bug deserves a detailed description :).","created_at":"2016-05-15T18:31:40Z","updated_at":"2016-05-15T18:31:40Z","html_url":"https://github.com/i3/i3lock/pull/74#discussion_r63295967","pull_request_url":"https://api.github.com/repos/i3/i3lock/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/i3/i3lock/pulls/comments/63295967"},"html":{"href":"https://github.com/i3/i3lock/pull/74#discussion_r63295967"},"pull_request":{"href":"https://api.github.com/repos/i3/i3lock/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/i3/i3lock/pulls/74","id":70120268,"html_url":"https://github.com/i3/i3lock/pull/74","diff_url":"https://github.com/i3/i3lock/pull/74.diff","patch_url":"https://github.com/i3/i3lock/pull/74.patch","issue_url":"https://api.github.com/repos/i3/i3lock/issues/74","number":74,"state":"open","locked":false,"title":"Flush xcb connection after opening fullscreen window","user":{"login":"sandsmark","id":25765,"avatar_url":"https://avatars.githubusercontent.com/u/25765?v=3","gravatar_id":"","url":"https://api.github.com/users/sandsmark","html_url":"https://github.com/sandsmark","followers_url":"https://api.github.com/users/sandsmark/followers","following_url":"https://api.github.com/users/sandsmark/following{/other_user}","gists_url":"https://api.github.com/users/sandsmark/gists{/gist_id}","starred_url":"https://api.github.com/users/sandsmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandsmark/subscriptions","organizations_url":"https://api.github.com/users/sandsmark/orgs","repos_url":"https://api.github.com/users/sandsmark/repos","events_url":"https://api.github.com/users/sandsmark/events{/privacy}","received_events_url":"https://api.github.com/users/sandsmark/received_events","type":"User","site_admin":false},"body":"We need to ensure that the window handle is usable before returning so\r\nit can be used immediately.\r\n\r\nFixes #46","created_at":"2016-05-15T12:43:05Z","updated_at":"2016-05-15T18:31:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"279f828900460d0961eb9424fbe417e77e474ad4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/i3/i3lock/pulls/74/commits","review_comments_url":"https://api.github.com/repos/i3/i3lock/pulls/74/comments","review_comment_url":"https://api.github.com/repos/i3/i3lock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/i3/i3lock/issues/74/comments","statuses_url":"https://api.github.com/repos/i3/i3lock/statuses/1158c89fa24d799463253d7676c67dc095cf88f1","head":{"label":"sandsmark:master","ref":"master","sha":"1158c89fa24d799463253d7676c67dc095cf88f1","user":{"login":"sandsmark","id":25765,"avatar_url":"https://avatars.githubusercontent.com/u/25765?v=3","gravatar_id":"","url":"https://api.github.com/users/sandsmark","html_url":"https://github.com/sandsmark","followers_url":"https://api.github.com/users/sandsmark/followers","following_url":"https://api.github.com/users/sandsmark/following{/other_user}","gists_url":"https://api.github.com/users/sandsmark/gists{/gist_id}","starred_url":"https://api.github.com/users/sandsmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandsmark/subscriptions","organizations_url":"https://api.github.com/users/sandsmark/orgs","repos_url":"https://api.github.com/users/sandsmark/repos","events_url":"https://api.github.com/users/sandsmark/events{/privacy}","received_events_url":"https://api.github.com/users/sandsmark/received_events","type":"User","site_admin":false},"repo":{"id":58860984,"name":"i3lock","full_name":"sandsmark/i3lock","owner":{"login":"sandsmark","id":25765,"avatar_url":"https://avatars.githubusercontent.com/u/25765?v=3","gravatar_id":"","url":"https://api.github.com/users/sandsmark","html_url":"https://github.com/sandsmark","followers_url":"https://api.github.com/users/sandsmark/followers","following_url":"https://api.github.com/users/sandsmark/following{/other_user}","gists_url":"https://api.github.com/users/sandsmark/gists{/gist_id}","starred_url":"https://api.github.com/users/sandsmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandsmark/subscriptions","organizations_url":"https://api.github.com/users/sandsmark/orgs","repos_url":"https://api.github.com/users/sandsmark/repos","events_url":"https://api.github.com/users/sandsmark/events{/privacy}","received_events_url":"https://api.github.com/users/sandsmark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sandsmark/i3lock","description":"improved screen locker","fork":true,"url":"https://api.github.com/repos/sandsmark/i3lock","forks_url":"https://api.github.com/repos/sandsmark/i3lock/forks","keys_url":"https://api.github.com/repos/sandsmark/i3lock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sandsmark/i3lock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sandsmark/i3lock/teams","hooks_url":"https://api.github.com/repos/sandsmark/i3lock/hooks","issue_events_url":"https://api.github.com/repos/sandsmark/i3lock/issues/events{/number}","events_url":"https://api.github.com/repos/sandsmark/i3lock/events","assignees_url":"https://api.github.com/repos/sandsmark/i3lock/assignees{/user}","branches_url":"https://api.github.com/repos/sandsmark/i3lock/branches{/branch}","tags_url":"https://api.github.com/repos/sandsmark/i3lock/tags","blobs_url":"https://api.github.com/repos/sandsmark/i3lock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sandsmark/i3lock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sandsmark/i3lock/git/refs{/sha}","trees_url":"https://api.github.com/repos/sandsmark/i3lock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sandsmark/i3lock/statuses/{sha}","languages_url":"https://api.github.com/repos/sandsmark/i3lock/languages","stargazers_url":"https://api.github.com/repos/sandsmark/i3lock/stargazers","contributors_url":"https://api.github.com/repos/sandsmark/i3lock/contributors","subscribers_url":"https://api.github.com/repos/sandsmark/i3lock/subscribers","subscription_url":"https://api.github.com/repos/sandsmark/i3lock/subscription","commits_url":"https://api.github.com/repos/sandsmark/i3lock/commits{/sha}","git_commits_url":"https://api.github.com/repos/sandsmark/i3lock/git/commits{/sha}","comments_url":"https://api.github.com/repos/sandsmark/i3lock/comments{/number}","issue_comment_url":"https://api.github.com/repos/sandsmark/i3lock/issues/comments{/number}","contents_url":"https://api.github.com/repos/sandsmark/i3lock/contents/{+path}","compare_url":"https://api.github.com/repos/sandsmark/i3lock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sandsmark/i3lock/merges","archive_url":"https://api.github.com/repos/sandsmark/i3lock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sandsmark/i3lock/downloads","issues_url":"https://api.github.com/repos/sandsmark/i3lock/issues{/number}","pulls_url":"https://api.github.com/repos/sandsmark/i3lock/pulls{/number}","milestones_url":"https://api.github.com/repos/sandsmark/i3lock/milestones{/number}","notifications_url":"https://api.github.com/repos/sandsmark/i3lock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sandsmark/i3lock/labels{/name}","releases_url":"https://api.github.com/repos/sandsmark/i3lock/releases{/id}","deployments_url":"https://api.github.com/repos/sandsmark/i3lock/deployments","created_at":"2016-05-15T12:42:40Z","updated_at":"2016-05-15T12:42:41Z","pushed_at":"2016-05-15T12:42:51Z","git_url":"git://github.com/sandsmark/i3lock.git","ssh_url":"git@github.com:sandsmark/i3lock.git","clone_url":"https://github.com/sandsmark/i3lock.git","svn_url":"https://github.com/sandsmark/i3lock","homepage":null,"size":210,"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":"i3:master","ref":"master","sha":"9a7604bb35212dcc49e1e108a0631a0906560e5a","user":{"login":"i3","id":7904352,"avatar_url":"https://avatars.githubusercontent.com/u/7904352?v=3","gravatar_id":"","url":"https://api.github.com/users/i3","html_url":"https://github.com/i3","followers_url":"https://api.github.com/users/i3/followers","following_url":"https://api.github.com/users/i3/following{/other_user}","gists_url":"https://api.github.com/users/i3/gists{/gist_id}","starred_url":"https://api.github.com/users/i3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i3/subscriptions","organizations_url":"https://api.github.com/users/i3/orgs","repos_url":"https://api.github.com/users/i3/repos","events_url":"https://api.github.com/users/i3/events{/privacy}","received_events_url":"https://api.github.com/users/i3/received_events","type":"Organization","site_admin":false},"repo":{"id":28519514,"name":"i3lock","full_name":"i3/i3lock","owner":{"login":"i3","id":7904352,"avatar_url":"https://avatars.githubusercontent.com/u/7904352?v=3","gravatar_id":"","url":"https://api.github.com/users/i3","html_url":"https://github.com/i3","followers_url":"https://api.github.com/users/i3/followers","following_url":"https://api.github.com/users/i3/following{/other_user}","gists_url":"https://api.github.com/users/i3/gists{/gist_id}","starred_url":"https://api.github.com/users/i3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i3/subscriptions","organizations_url":"https://api.github.com/users/i3/orgs","repos_url":"https://api.github.com/users/i3/repos","events_url":"https://api.github.com/users/i3/events{/privacy}","received_events_url":"https://api.github.com/users/i3/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/i3/i3lock","description":"improved screen locker","fork":false,"url":"https://api.github.com/repos/i3/i3lock","forks_url":"https://api.github.com/repos/i3/i3lock/forks","keys_url":"https://api.github.com/repos/i3/i3lock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/i3/i3lock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/i3/i3lock/teams","hooks_url":"https://api.github.com/repos/i3/i3lock/hooks","issue_events_url":"https://api.github.com/repos/i3/i3lock/issues/events{/number}","events_url":"https://api.github.com/repos/i3/i3lock/events","assignees_url":"https://api.github.com/repos/i3/i3lock/assignees{/user}","branches_url":"https://api.github.com/repos/i3/i3lock/branches{/branch}","tags_url":"https://api.github.com/repos/i3/i3lock/tags","blobs_url":"https://api.github.com/repos/i3/i3lock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/i3/i3lock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/i3/i3lock/git/refs{/sha}","trees_url":"https://api.github.com/repos/i3/i3lock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/i3/i3lock/statuses/{sha}","languages_url":"https://api.github.com/repos/i3/i3lock/languages","stargazers_url":"https://api.github.com/repos/i3/i3lock/stargazers","contributors_url":"https://api.github.com/repos/i3/i3lock/contributors","subscribers_url":"https://api.github.com/repos/i3/i3lock/subscribers","subscription_url":"https://api.github.com/repos/i3/i3lock/subscription","commits_url":"https://api.github.com/repos/i3/i3lock/commits{/sha}","git_commits_url":"https://api.github.com/repos/i3/i3lock/git/commits{/sha}","comments_url":"https://api.github.com/repos/i3/i3lock/comments{/number}","issue_comment_url":"https://api.github.com/repos/i3/i3lock/issues/comments{/number}","contents_url":"https://api.github.com/repos/i3/i3lock/contents/{+path}","compare_url":"https://api.github.com/repos/i3/i3lock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/i3/i3lock/merges","archive_url":"https://api.github.com/repos/i3/i3lock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/i3/i3lock/downloads","issues_url":"https://api.github.com/repos/i3/i3lock/issues{/number}","pulls_url":"https://api.github.com/repos/i3/i3lock/pulls{/number}","milestones_url":"https://api.github.com/repos/i3/i3lock/milestones{/number}","notifications_url":"https://api.github.com/repos/i3/i3lock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/i3/i3lock/labels{/name}","releases_url":"https://api.github.com/repos/i3/i3lock/releases{/id}","deployments_url":"https://api.github.com/repos/i3/i3lock/deployments","created_at":"2014-12-26T19:41:34Z","updated_at":"2016-05-05T19:00:30Z","pushed_at":"2016-05-15T12:43:06Z","git_url":"git://github.com/i3/i3lock.git","ssh_url":"git@github.com:i3/i3lock.git","clone_url":"https://github.com/i3/i3lock.git","svn_url":"https://github.com/i3/i3lock","homepage":null,"size":3865,"stargazers_count":96,"watchers_count":96,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":80,"mirror_url":null,"open_issues_count":9,"forks":80,"open_issues":9,"watchers":96,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/i3/i3lock/pulls/74"},"html":{"href":"https://github.com/i3/i3lock/pull/74"},"issue":{"href":"https://api.github.com/repos/i3/i3lock/issues/74"},"comments":{"href":"https://api.github.com/repos/i3/i3lock/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/i3/i3lock/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/i3/i3lock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/i3/i3lock/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/i3/i3lock/statuses/1158c89fa24d799463253d7676c67dc095cf88f1"}}}}