{"action":"created","comment":{"url":"https://api.github.com/repos/DaveDavenport/rofi/pulls/comments/76937721","id":76937721,"diff_hunk":"@@ -213,8 +215,66 @@ static workarea * x11_get_monitor_from_output ( xcb_randr_output_t out )\n     return retv;\n }\n \n+uint8_t x11_is_randr_present () {\n+    xcb_query_extension_cookie_t randr_cookie = xcb_query_extension (\n+        xcb->connection,\n+        sizeof(\"RANDR\")-1,\n+        \"RANDR\"\n+    );\n+\n+    xcb_query_extension_reply_t *randr_reply = xcb_query_extension_reply (\n+        xcb->connection,\n+        randr_cookie,\n+        NULL\n+    );\n+\n+    return randr_reply->present;\n+}\n+\n+void x11_build_monitor_layout_xinerama () {\n+    xcb_xinerama_query_screens_cookie_t screens_cookie = xcb_xinerama_query_screens_unchecked (\n+        xcb->connection\n+    );\n+\n+    xcb_xinerama_query_screens_reply_t *screens_reply = xcb_xinerama_query_screens_reply (\n+        xcb->connection,\n+        screens_cookie,\n+        NULL\n+    );\n+\n+    xcb_xinerama_screen_info_iterator_t screens_iterator = xcb_xinerama_query_screens_screen_info_iterator (\n+        screens_reply\n+    );\n+\n+    for ( ; screens_iterator.rem > 0; xcb_xinerama_screen_info_next (&screens_iterator) ) {\n+        workarea *w = g_malloc0 ( sizeof ( workarea ) );\n+\n+        w->x = screens_iterator.data->x_org;\n+        w->y = screens_iterator.data->y_org;\n+        w->w = screens_iterator.data->width;\n+        w->h = screens_iterator.data->height;\n+\n+        if ( w ) {\n+            w->next       = xcb->monitors;\n+            xcb->monitors = w;\n+        }\n+    }\n+\n+    int index = 0;\n+    for ( workarea *iter = xcb->monitors; iter; iter = iter->next ) {\n+        iter->monitor_id = index++;\n+    }\n+\n+    free ( screens_reply );\n+}\n+\n void x11_build_monitor_layout ()\n {\n+    if ( !x11_is_randr_present () ) {\n+        fprintf ( stderr, \"Using XINERAMA instead of XRANDR\\n\" );\n+        x11_build_monitor_layout_xinerama ();","path":"source/x11-helper.c","position":89,"original_position":71,"commit_id":"a6207e473aff43dc1e86d10d64943f1d071c02aa","original_commit_id":"05165a02f221d0fd26ccde004862cc3e3c2984a1","user":{"login":"DaveDavenport","id":406245,"avatar_url":"https://avatars.githubusercontent.com/u/406245?v=3","gravatar_id":"","url":"https://api.github.com/users/DaveDavenport","html_url":"https://github.com/DaveDavenport","followers_url":"https://api.github.com/users/DaveDavenport/followers","following_url":"https://api.github.com/users/DaveDavenport/following{/other_user}","gists_url":"https://api.github.com/users/DaveDavenport/gists{/gist_id}","starred_url":"https://api.github.com/users/DaveDavenport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaveDavenport/subscriptions","organizations_url":"https://api.github.com/users/DaveDavenport/orgs","repos_url":"https://api.github.com/users/DaveDavenport/repos","events_url":"https://api.github.com/users/DaveDavenport/events{/privacy}","received_events_url":"https://api.github.com/users/DaveDavenport/received_events","type":"User","site_admin":false},"body":"No, if x11_build_monitor_layout, it falls back to the size of the root window.","created_at":"2016-08-31T07:35:51Z","updated_at":"2016-08-31T07:35:51Z","html_url":"https://github.com/DaveDavenport/rofi/pull/455#discussion_r76937721","pull_request_url":"https://api.github.com/repos/DaveDavenport/rofi/pulls/455","_links":{"self":{"href":"https://api.github.com/repos/DaveDavenport/rofi/pulls/comments/76937721"},"html":{"href":"https://github.com/DaveDavenport/rofi/pull/455#discussion_r76937721"},"pull_request":{"href":"https://api.github.com/repos/DaveDavenport/rofi/pulls/455"}}},"pull_request":{"url":"https://api.github.com/repos/DaveDavenport/rofi/pulls/455","id":83400097,"html_url":"https://github.com/DaveDavenport/rofi/pull/455","diff_url":"https://github.com/DaveDavenport/rofi/pull/455.diff","patch_url":"https://github.com/DaveDavenport/rofi/pull/455.patch","issue_url":"https://api.github.com/repos/DaveDavenport/rofi/issues/455","number":455,"state":"open","locked":false,"title":"add xinerama support","user":{"login":"seletskiy","id":674812,"avatar_url":"https://avatars.githubusercontent.com/u/674812?v=3","gravatar_id":"","url":"https://api.github.com/users/seletskiy","html_url":"https://github.com/seletskiy","followers_url":"https://api.github.com/users/seletskiy/followers","following_url":"https://api.github.com/users/seletskiy/following{/other_user}","gists_url":"https://api.github.com/users/seletskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/seletskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seletskiy/subscriptions","organizations_url":"https://api.github.com/users/seletskiy/orgs","repos_url":"https://api.github.com/users/seletskiy/repos","events_url":"https://api.github.com/users/seletskiy/events{/privacy}","received_events_url":"https://api.github.com/users/seletskiy/received_events","type":"User","site_admin":false},"body":"My Xorg setup doesn't support RANDR (nvidia+xorg), so I basically get error\nwhen trying to run `rofi`. It's because `rofi` requests `randr` info and\nbreak xcb connection by doing that.\n\n```\nxkbcommon: ERROR: xkb_x11_keymap_new_from_device: illegal device ID: -1\nFailed to get Keymap for current keyboard device.\n*** Error in `rofi': double free or corruption (top): 0x000000000098f7c0 ***\n```","created_at":"2016-08-31T07:16:17Z","updated_at":"2016-08-31T07:35:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b32bbb6d2a444087489ec4ddb2a1ce01b010b2f6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/DaveDavenport/rofi/pulls/455/commits","review_comments_url":"https://api.github.com/repos/DaveDavenport/rofi/pulls/455/comments","review_comment_url":"https://api.github.com/repos/DaveDavenport/rofi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DaveDavenport/rofi/issues/455/comments","statuses_url":"https://api.github.com/repos/DaveDavenport/rofi/statuses/a6207e473aff43dc1e86d10d64943f1d071c02aa","head":{"label":"seletskiy:xinerama","ref":"xinerama","sha":"a6207e473aff43dc1e86d10d64943f1d071c02aa","user":{"login":"seletskiy","id":674812,"avatar_url":"https://avatars.githubusercontent.com/u/674812?v=3","gravatar_id":"","url":"https://api.github.com/users/seletskiy","html_url":"https://github.com/seletskiy","followers_url":"https://api.github.com/users/seletskiy/followers","following_url":"https://api.github.com/users/seletskiy/following{/other_user}","gists_url":"https://api.github.com/users/seletskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/seletskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seletskiy/subscriptions","organizations_url":"https://api.github.com/users/seletskiy/orgs","repos_url":"https://api.github.com/users/seletskiy/repos","events_url":"https://api.github.com/users/seletskiy/events{/privacy}","received_events_url":"https://api.github.com/users/seletskiy/received_events","type":"User","site_admin":false},"repo":{"id":67013187,"name":"rofi","full_name":"seletskiy/rofi","owner":{"login":"seletskiy","id":674812,"avatar_url":"https://avatars.githubusercontent.com/u/674812?v=3","gravatar_id":"","url":"https://api.github.com/users/seletskiy","html_url":"https://github.com/seletskiy","followers_url":"https://api.github.com/users/seletskiy/followers","following_url":"https://api.github.com/users/seletskiy/following{/other_user}","gists_url":"https://api.github.com/users/seletskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/seletskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seletskiy/subscriptions","organizations_url":"https://api.github.com/users/seletskiy/orgs","repos_url":"https://api.github.com/users/seletskiy/repos","events_url":"https://api.github.com/users/seletskiy/events{/privacy}","received_events_url":"https://api.github.com/users/seletskiy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/seletskiy/rofi","description":"Rofi: A window switcher, run dialog and dmenu replacement","fork":true,"url":"https://api.github.com/repos/seletskiy/rofi","forks_url":"https://api.github.com/repos/seletskiy/rofi/forks","keys_url":"https://api.github.com/repos/seletskiy/rofi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seletskiy/rofi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seletskiy/rofi/teams","hooks_url":"https://api.github.com/repos/seletskiy/rofi/hooks","issue_events_url":"https://api.github.com/repos/seletskiy/rofi/issues/events{/number}","events_url":"https://api.github.com/repos/seletskiy/rofi/events","assignees_url":"https://api.github.com/repos/seletskiy/rofi/assignees{/user}","branches_url":"https://api.github.com/repos/seletskiy/rofi/branches{/branch}","tags_url":"https://api.github.com/repos/seletskiy/rofi/tags","blobs_url":"https://api.github.com/repos/seletskiy/rofi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seletskiy/rofi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seletskiy/rofi/git/refs{/sha}","trees_url":"https://api.github.com/repos/seletskiy/rofi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seletskiy/rofi/statuses/{sha}","languages_url":"https://api.github.com/repos/seletskiy/rofi/languages","stargazers_url":"https://api.github.com/repos/seletskiy/rofi/stargazers","contributors_url":"https://api.github.com/repos/seletskiy/rofi/contributors","subscribers_url":"https://api.github.com/repos/seletskiy/rofi/subscribers","subscription_url":"https://api.github.com/repos/seletskiy/rofi/subscription","commits_url":"https://api.github.com/repos/seletskiy/rofi/commits{/sha}","git_commits_url":"https://api.github.com/repos/seletskiy/rofi/git/commits{/sha}","comments_url":"https://api.github.com/repos/seletskiy/rofi/comments{/number}","issue_comment_url":"https://api.github.com/repos/seletskiy/rofi/issues/comments{/number}","contents_url":"https://api.github.com/repos/seletskiy/rofi/contents/{+path}","compare_url":"https://api.github.com/repos/seletskiy/rofi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seletskiy/rofi/merges","archive_url":"https://api.github.com/repos/seletskiy/rofi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seletskiy/rofi/downloads","issues_url":"https://api.github.com/repos/seletskiy/rofi/issues{/number}","pulls_url":"https://api.github.com/repos/seletskiy/rofi/pulls{/number}","milestones_url":"https://api.github.com/repos/seletskiy/rofi/milestones{/number}","notifications_url":"https://api.github.com/repos/seletskiy/rofi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seletskiy/rofi/labels{/name}","releases_url":"https://api.github.com/repos/seletskiy/rofi/releases{/id}","deployments_url":"https://api.github.com/repos/seletskiy/rofi/deployments","created_at":"2016-08-31T07:14:09Z","updated_at":"2016-08-31T07:14:11Z","pushed_at":"2016-08-31T07:33:44Z","git_url":"git://github.com/seletskiy/rofi.git","ssh_url":"git@github.com:seletskiy/rofi.git","clone_url":"https://github.com/seletskiy/rofi.git","svn_url":"https://github.com/seletskiy/rofi","homepage":"https://davedavenport.github.io/rofi/","size":10093,"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":"DaveDavenport:master","ref":"master","sha":"21b35b3e3ec21b423319f199aa82deda8aa94e03","user":{"login":"DaveDavenport","id":406245,"avatar_url":"https://avatars.githubusercontent.com/u/406245?v=3","gravatar_id":"","url":"https://api.github.com/users/DaveDavenport","html_url":"https://github.com/DaveDavenport","followers_url":"https://api.github.com/users/DaveDavenport/followers","following_url":"https://api.github.com/users/DaveDavenport/following{/other_user}","gists_url":"https://api.github.com/users/DaveDavenport/gists{/gist_id}","starred_url":"https://api.github.com/users/DaveDavenport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaveDavenport/subscriptions","organizations_url":"https://api.github.com/users/DaveDavenport/orgs","repos_url":"https://api.github.com/users/DaveDavenport/repos","events_url":"https://api.github.com/users/DaveDavenport/events{/privacy}","received_events_url":"https://api.github.com/users/DaveDavenport/received_events","type":"User","site_admin":false},"repo":{"id":7715820,"name":"rofi","full_name":"DaveDavenport/rofi","owner":{"login":"DaveDavenport","id":406245,"avatar_url":"https://avatars.githubusercontent.com/u/406245?v=3","gravatar_id":"","url":"https://api.github.com/users/DaveDavenport","html_url":"https://github.com/DaveDavenport","followers_url":"https://api.github.com/users/DaveDavenport/followers","following_url":"https://api.github.com/users/DaveDavenport/following{/other_user}","gists_url":"https://api.github.com/users/DaveDavenport/gists{/gist_id}","starred_url":"https://api.github.com/users/DaveDavenport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaveDavenport/subscriptions","organizations_url":"https://api.github.com/users/DaveDavenport/orgs","repos_url":"https://api.github.com/users/DaveDavenport/repos","events_url":"https://api.github.com/users/DaveDavenport/events{/privacy}","received_events_url":"https://api.github.com/users/DaveDavenport/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DaveDavenport/rofi","description":"Rofi: A window switcher, run dialog and dmenu replacement","fork":false,"url":"https://api.github.com/repos/DaveDavenport/rofi","forks_url":"https://api.github.com/repos/DaveDavenport/rofi/forks","keys_url":"https://api.github.com/repos/DaveDavenport/rofi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DaveDavenport/rofi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DaveDavenport/rofi/teams","hooks_url":"https://api.github.com/repos/DaveDavenport/rofi/hooks","issue_events_url":"https://api.github.com/repos/DaveDavenport/rofi/issues/events{/number}","events_url":"https://api.github.com/repos/DaveDavenport/rofi/events","assignees_url":"https://api.github.com/repos/DaveDavenport/rofi/assignees{/user}","branches_url":"https://api.github.com/repos/DaveDavenport/rofi/branches{/branch}","tags_url":"https://api.github.com/repos/DaveDavenport/rofi/tags","blobs_url":"https://api.github.com/repos/DaveDavenport/rofi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DaveDavenport/rofi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DaveDavenport/rofi/git/refs{/sha}","trees_url":"https://api.github.com/repos/DaveDavenport/rofi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DaveDavenport/rofi/statuses/{sha}","languages_url":"https://api.github.com/repos/DaveDavenport/rofi/languages","stargazers_url":"https://api.github.com/repos/DaveDavenport/rofi/stargazers","contributors_url":"https://api.github.com/repos/DaveDavenport/rofi/contributors","subscribers_url":"https://api.github.com/repos/DaveDavenport/rofi/subscribers","subscription_url":"https://api.github.com/repos/DaveDavenport/rofi/subscription","commits_url":"https://api.github.com/repos/DaveDavenport/rofi/commits{/sha}","git_commits_url":"https://api.github.com/repos/DaveDavenport/rofi/git/commits{/sha}","comments_url":"https://api.github.com/repos/DaveDavenport/rofi/comments{/number}","issue_comment_url":"https://api.github.com/repos/DaveDavenport/rofi/issues/comments{/number}","contents_url":"https://api.github.com/repos/DaveDavenport/rofi/contents/{+path}","compare_url":"https://api.github.com/repos/DaveDavenport/rofi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DaveDavenport/rofi/merges","archive_url":"https://api.github.com/repos/DaveDavenport/rofi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DaveDavenport/rofi/downloads","issues_url":"https://api.github.com/repos/DaveDavenport/rofi/issues{/number}","pulls_url":"https://api.github.com/repos/DaveDavenport/rofi/pulls{/number}","milestones_url":"https://api.github.com/repos/DaveDavenport/rofi/milestones{/number}","notifications_url":"https://api.github.com/repos/DaveDavenport/rofi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DaveDavenport/rofi/labels{/name}","releases_url":"https://api.github.com/repos/DaveDavenport/rofi/releases{/id}","deployments_url":"https://api.github.com/repos/DaveDavenport/rofi/deployments","created_at":"2013-01-20T11:54:45Z","updated_at":"2016-08-30T07:26:55Z","pushed_at":"2016-08-31T07:33:44Z","git_url":"git://github.com/DaveDavenport/rofi.git","ssh_url":"git@github.com:DaveDavenport/rofi.git","clone_url":"https://github.com/DaveDavenport/rofi.git","svn_url":"https://github.com/DaveDavenport/rofi","homepage":"https://davedavenport.github.io/rofi/","size":10093,"stargazers_count":942,"watchers_count":942,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":69,"mirror_url":null,"open_issues_count":24,"forks":69,"open_issues":24,"watchers":942,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DaveDavenport/rofi/pulls/455"},"html":{"href":"https://github.com/DaveDavenport/rofi/pull/455"},"issue":{"href":"https://api.github.com/repos/DaveDavenport/rofi/issues/455"},"comments":{"href":"https://api.github.com/repos/DaveDavenport/rofi/issues/455/comments"},"review_comments":{"href":"https://api.github.com/repos/DaveDavenport/rofi/pulls/455/comments"},"review_comment":{"href":"https://api.github.com/repos/DaveDavenport/rofi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DaveDavenport/rofi/pulls/455/commits"},"statuses":{"href":"https://api.github.com/repos/DaveDavenport/rofi/statuses/a6207e473aff43dc1e86d10d64943f1d071c02aa"}}}}
{"actor":{"display_login":"DaveDavenport"}}