{"action":"created","comment":{"url":"https://api.github.com/repos/minetest/minetest/pulls/comments/195799885","pull_request_review_id":129241017,"id":195799885,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTc5OTg4NQ==","diff_hunk":"@@ -186,23 +187,119 @@ bool RenderingEngine::print_video_modes()\n \treturn videomode_list != NULL;\n }\n \n-void RenderingEngine::setXorgClassHint(\n-\t\tconst video::SExposedVideoData &video_data, const std::string &name)\n+bool RenderingEngine::setupTopLevelWindow(const std::string &name)\n+{\n+\t// FIXME: It would make more sense for there to be a switch of some\n+\t// sort here that would call the correct toplevel setup methods for\n+\t// the environment Minetest is running in but for now not deviating\n+\t// from the original pattern.\n+\t\n+\t/* Setting Xorg properties for the top level window */\n+\tsetupTopLevelXorgWindow(name);\n+\t/* Done with Xorg properties */\n+\n+\t/* Setting general properties for the top level window */\n+\tverbosestream << \"Client: Configuring general top level\"\n+\t\t<< \" window properties\"\n+\t\t<< std::endl;\n+\n+\tbool result = setWindowIcon();\n+\n+\tverbosestream << \"Client: Finished configuring general top level\"\n+\t\t<< \" window properties\"\n+\t\t<< std::endl;\n+\t/* Done with general properties */\n+\n+\t// FIXME: setWindowIcon returns a bool result but it is unused.\n+\t// For now continue to return this result. \n+\treturn result;\n+}\n+\n+void RenderingEngine::setupTopLevelXorgWindow(const std::string &name)\n {\n #ifdef XORG_USED\n-\tif (video_data.OpenGLLinux.X11Display == NULL)\n+\tconst video::SExposedVideoData exposedData = driver->getExposedVideoData();\n+\n+\tDisplay *x11_dpl = (Display *)exposedData.OpenGLLinux.X11Display;","path":"src/client/renderingengine.cpp","position":48,"original_position":48,"commit_id":"7aa2dc988dedd654b8d6c584b269697174a04740","original_commit_id":"7aa2dc988dedd654b8d6c584b269697174a04740","user":{"login":"sfan5","id":1042418,"node_id":"MDQ6VXNlcjEwNDI0MTg=","avatar_url":"https://avatars1.githubusercontent.com/u/1042418?v=4","gravatar_id":"","url":"https://api.github.com/users/sfan5","html_url":"https://github.com/sfan5","followers_url":"https://api.github.com/users/sfan5/followers","following_url":"https://api.github.com/users/sfan5/following{/other_user}","gists_url":"https://api.github.com/users/sfan5/gists{/gist_id}","starred_url":"https://api.github.com/users/sfan5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfan5/subscriptions","organizations_url":"https://api.github.com/users/sfan5/orgs","repos_url":"https://api.github.com/users/sfan5/repos","events_url":"https://api.github.com/users/sfan5/events{/privacy}","received_events_url":"https://api.github.com/users/sfan5/received_events","type":"User","site_admin":false},"body":"is this cast required at all? otherwise `reinterpret_cast`","created_at":"2018-06-15T16:41:18Z","updated_at":"2018-06-15T16:42:12Z","html_url":"https://github.com/minetest/minetest/pull/7445#discussion_r195799885","pull_request_url":"https://api.github.com/repos/minetest/minetest/pulls/7445","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/minetest/minetest/pulls/comments/195799885"},"html":{"href":"https://github.com/minetest/minetest/pull/7445#discussion_r195799885"},"pull_request":{"href":"https://api.github.com/repos/minetest/minetest/pulls/7445"}}},"pull_request":{"url":"https://api.github.com/repos/minetest/minetest/pulls/7445","id":194670851,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NjcwODUx","html_url":"https://github.com/minetest/minetest/pull/7445","diff_url":"https://github.com/minetest/minetest/pull/7445.diff","patch_url":"https://github.com/minetest/minetest/pull/7445.patch","issue_url":"https://api.github.com/repos/minetest/minetest/issues/7445","number":7445,"state":"open","locked":false,"title":"Xorg/net wm pid","user":{"login":"thoughtjigs","id":10107046,"node_id":"MDQ6VXNlcjEwMTA3MDQ2","avatar_url":"https://avatars2.githubusercontent.com/u/10107046?v=4","gravatar_id":"","url":"https://api.github.com/users/thoughtjigs","html_url":"https://github.com/thoughtjigs","followers_url":"https://api.github.com/users/thoughtjigs/followers","following_url":"https://api.github.com/users/thoughtjigs/following{/other_user}","gists_url":"https://api.github.com/users/thoughtjigs/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtjigs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtjigs/subscriptions","organizations_url":"https://api.github.com/users/thoughtjigs/orgs","repos_url":"https://api.github.com/users/thoughtjigs/repos","events_url":"https://api.github.com/users/thoughtjigs/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtjigs/received_events","type":"User","site_admin":false},"body":"While working on a personal X window manager project I discovered that minetest does not support most of the [Extended Window Manager Hints spec](https://specifications.freedesktop.org/wm-spec/latest/ar01s05.html#idm139870829938624). This includes things like _NET_WM_PID which allows the discovery of the process underlying a window. \r\n\r\nProviding _NET_WM_PID will allow window managers to terminate an unresponsive minetest window. \r\n\r\nThere is actually quite a bit of work that could be done to improve how minetest handles the additional Xorg stuff that Irrlicht doesn't support but for a start getting support for _NET_WM_PID is probably the easiest to achieve. \r\n\r\nI have also created a backport of these changes to the 14.7.1 branch if that will be useful. \r\n\r\n--EDIT--\r\nEditing to add that xprop can be used at the CLI to verify that _NET_WM_PID and WM_CLIENT_MACHINE have been set correctly. \r\n","created_at":"2018-06-13T18:09:58Z","updated_at":"2018-06-15T16:42:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61b2a6611662fb7cf52c2860a802836e1113a731","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":73368958,"node_id":"MDU6TGFiZWw3MzM2ODk1OA==","url":"https://api.github.com/repos/minetest/minetest/labels/@%20Startup%20/%20Config%20/%20Util","name":"@ Startup / Config / Util","color":"0e8a16","default":false},{"id":471238548,"node_id":"MDU6TGFiZWw0NzEyMzg1NDg=","url":"https://api.github.com/repos/minetest/minetest/labels/Feature","name":"Feature","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/minetest/minetest/pulls/7445/commits","review_comments_url":"https://api.github.com/repos/minetest/minetest/pulls/7445/comments","review_comment_url":"https://api.github.com/repos/minetest/minetest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/7445/comments","statuses_url":"https://api.github.com/repos/minetest/minetest/statuses/7aa2dc988dedd654b8d6c584b269697174a04740","head":{"label":"thoughtjigs:xorg/net_wm_pid","ref":"xorg/net_wm_pid","sha":"7aa2dc988dedd654b8d6c584b269697174a04740","user":{"login":"thoughtjigs","id":10107046,"node_id":"MDQ6VXNlcjEwMTA3MDQ2","avatar_url":"https://avatars2.githubusercontent.com/u/10107046?v=4","gravatar_id":"","url":"https://api.github.com/users/thoughtjigs","html_url":"https://github.com/thoughtjigs","followers_url":"https://api.github.com/users/thoughtjigs/followers","following_url":"https://api.github.com/users/thoughtjigs/following{/other_user}","gists_url":"https://api.github.com/users/thoughtjigs/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtjigs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtjigs/subscriptions","organizations_url":"https://api.github.com/users/thoughtjigs/orgs","repos_url":"https://api.github.com/users/thoughtjigs/repos","events_url":"https://api.github.com/users/thoughtjigs/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtjigs/received_events","type":"User","site_admin":false},"repo":{"id":137242288,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcyNDIyODg=","name":"minetest","full_name":"thoughtjigs/minetest","owner":{"login":"thoughtjigs","id":10107046,"node_id":"MDQ6VXNlcjEwMTA3MDQ2","avatar_url":"https://avatars2.githubusercontent.com/u/10107046?v=4","gravatar_id":"","url":"https://api.github.com/users/thoughtjigs","html_url":"https://github.com/thoughtjigs","followers_url":"https://api.github.com/users/thoughtjigs/followers","following_url":"https://api.github.com/users/thoughtjigs/following{/other_user}","gists_url":"https://api.github.com/users/thoughtjigs/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtjigs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtjigs/subscriptions","organizations_url":"https://api.github.com/users/thoughtjigs/orgs","repos_url":"https://api.github.com/users/thoughtjigs/repos","events_url":"https://api.github.com/users/thoughtjigs/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtjigs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thoughtjigs/minetest","description":"Minetest, an open source infinite-world block sandbox game engine with support for survival and crafting. Also see https://github.com/minetest/minetest_game","fork":true,"url":"https://api.github.com/repos/thoughtjigs/minetest","forks_url":"https://api.github.com/repos/thoughtjigs/minetest/forks","keys_url":"https://api.github.com/repos/thoughtjigs/minetest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtjigs/minetest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtjigs/minetest/teams","hooks_url":"https://api.github.com/repos/thoughtjigs/minetest/hooks","issue_events_url":"https://api.github.com/repos/thoughtjigs/minetest/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtjigs/minetest/events","assignees_url":"https://api.github.com/repos/thoughtjigs/minetest/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtjigs/minetest/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtjigs/minetest/tags","blobs_url":"https://api.github.com/repos/thoughtjigs/minetest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtjigs/minetest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtjigs/minetest/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtjigs/minetest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtjigs/minetest/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtjigs/minetest/languages","stargazers_url":"https://api.github.com/repos/thoughtjigs/minetest/stargazers","contributors_url":"https://api.github.com/repos/thoughtjigs/minetest/contributors","subscribers_url":"https://api.github.com/repos/thoughtjigs/minetest/subscribers","subscription_url":"https://api.github.com/repos/thoughtjigs/minetest/subscription","commits_url":"https://api.github.com/repos/thoughtjigs/minetest/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtjigs/minetest/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtjigs/minetest/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtjigs/minetest/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtjigs/minetest/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtjigs/minetest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtjigs/minetest/merges","archive_url":"https://api.github.com/repos/thoughtjigs/minetest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtjigs/minetest/downloads","issues_url":"https://api.github.com/repos/thoughtjigs/minetest/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtjigs/minetest/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtjigs/minetest/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtjigs/minetest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtjigs/minetest/labels{/name}","releases_url":"https://api.github.com/repos/thoughtjigs/minetest/releases{/id}","deployments_url":"https://api.github.com/repos/thoughtjigs/minetest/deployments","created_at":"2018-06-13T16:29:40Z","updated_at":"2018-06-14T20:11:15Z","pushed_at":"2018-06-15T15:51:17Z","git_url":"git://github.com/thoughtjigs/minetest.git","ssh_url":"git@github.com:thoughtjigs/minetest.git","clone_url":"https://github.com/thoughtjigs/minetest.git","svn_url":"https://github.com/thoughtjigs/minetest","homepage":"http://minetest.net/","size":57733,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"minetest:master","ref":"master","sha":"10634f0443c478ff08daf80388198931befaa95c","user":{"login":"minetest","id":2624745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MjQ3NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/2624745?v=4","gravatar_id":"","url":"https://api.github.com/users/minetest","html_url":"https://github.com/minetest","followers_url":"https://api.github.com/users/minetest/followers","following_url":"https://api.github.com/users/minetest/following{/other_user}","gists_url":"https://api.github.com/users/minetest/gists{/gist_id}","starred_url":"https://api.github.com/users/minetest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minetest/subscriptions","organizations_url":"https://api.github.com/users/minetest/orgs","repos_url":"https://api.github.com/users/minetest/repos","events_url":"https://api.github.com/users/minetest/events{/privacy}","received_events_url":"https://api.github.com/users/minetest/received_events","type":"Organization","site_admin":false},"repo":{"id":2168780,"node_id":"MDEwOlJlcG9zaXRvcnkyMTY4Nzgw","name":"minetest","full_name":"minetest/minetest","owner":{"login":"minetest","id":2624745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MjQ3NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/2624745?v=4","gravatar_id":"","url":"https://api.github.com/users/minetest","html_url":"https://github.com/minetest","followers_url":"https://api.github.com/users/minetest/followers","following_url":"https://api.github.com/users/minetest/following{/other_user}","gists_url":"https://api.github.com/users/minetest/gists{/gist_id}","starred_url":"https://api.github.com/users/minetest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minetest/subscriptions","organizations_url":"https://api.github.com/users/minetest/orgs","repos_url":"https://api.github.com/users/minetest/repos","events_url":"https://api.github.com/users/minetest/events{/privacy}","received_events_url":"https://api.github.com/users/minetest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/minetest/minetest","description":"Minetest, an open source infinite-world block sandbox game engine with support for survival and crafting. Also see https://github.com/minetest/minetest_game","fork":false,"url":"https://api.github.com/repos/minetest/minetest","forks_url":"https://api.github.com/repos/minetest/minetest/forks","keys_url":"https://api.github.com/repos/minetest/minetest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minetest/minetest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minetest/minetest/teams","hooks_url":"https://api.github.com/repos/minetest/minetest/hooks","issue_events_url":"https://api.github.com/repos/minetest/minetest/issues/events{/number}","events_url":"https://api.github.com/repos/minetest/minetest/events","assignees_url":"https://api.github.com/repos/minetest/minetest/assignees{/user}","branches_url":"https://api.github.com/repos/minetest/minetest/branches{/branch}","tags_url":"https://api.github.com/repos/minetest/minetest/tags","blobs_url":"https://api.github.com/repos/minetest/minetest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minetest/minetest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minetest/minetest/git/refs{/sha}","trees_url":"https://api.github.com/repos/minetest/minetest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minetest/minetest/statuses/{sha}","languages_url":"https://api.github.com/repos/minetest/minetest/languages","stargazers_url":"https://api.github.com/repos/minetest/minetest/stargazers","contributors_url":"https://api.github.com/repos/minetest/minetest/contributors","subscribers_url":"https://api.github.com/repos/minetest/minetest/subscribers","subscription_url":"https://api.github.com/repos/minetest/minetest/subscription","commits_url":"https://api.github.com/repos/minetest/minetest/commits{/sha}","git_commits_url":"https://api.github.com/repos/minetest/minetest/git/commits{/sha}","comments_url":"https://api.github.com/repos/minetest/minetest/comments{/number}","issue_comment_url":"https://api.github.com/repos/minetest/minetest/issues/comments{/number}","contents_url":"https://api.github.com/repos/minetest/minetest/contents/{+path}","compare_url":"https://api.github.com/repos/minetest/minetest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minetest/minetest/merges","archive_url":"https://api.github.com/repos/minetest/minetest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minetest/minetest/downloads","issues_url":"https://api.github.com/repos/minetest/minetest/issues{/number}","pulls_url":"https://api.github.com/repos/minetest/minetest/pulls{/number}","milestones_url":"https://api.github.com/repos/minetest/minetest/milestones{/number}","notifications_url":"https://api.github.com/repos/minetest/minetest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minetest/minetest/labels{/name}","releases_url":"https://api.github.com/repos/minetest/minetest/releases{/id}","deployments_url":"https://api.github.com/repos/minetest/minetest/deployments","created_at":"2011-08-07T13:48:36Z","updated_at":"2018-06-15T07:17:10Z","pushed_at":"2018-06-15T15:51:21Z","git_url":"git://github.com/minetest/minetest.git","ssh_url":"git@github.com:minetest/minetest.git","clone_url":"https://github.com/minetest/minetest.git","svn_url":"https://github.com/minetest/minetest","homepage":"http://minetest.net/","size":57807,"stargazers_count":3289,"watchers_count":3289,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":900,"mirror_url":null,"archived":false,"open_issues_count":890,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":900,"open_issues":890,"watchers":3289,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minetest/minetest/pulls/7445"},"html":{"href":"https://github.com/minetest/minetest/pull/7445"},"issue":{"href":"https://api.github.com/repos/minetest/minetest/issues/7445"},"comments":{"href":"https://api.github.com/repos/minetest/minetest/issues/7445/comments"},"review_comments":{"href":"https://api.github.com/repos/minetest/minetest/pulls/7445/comments"},"review_comment":{"href":"https://api.github.com/repos/minetest/minetest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minetest/minetest/pulls/7445/commits"},"statuses":{"href":"https://api.github.com/repos/minetest/minetest/statuses/7aa2dc988dedd654b8d6c584b269697174a04740"}},"author_association":"NONE"}}
{"actor":{"display_login":"sfan5"}}