{"action":"created","issue":{"url":"https://api.github.com/repos/SirCmpwn/sway/issues/701","repository_url":"https://api.github.com/repos/SirCmpwn/sway","labels_url":"https://api.github.com/repos/SirCmpwn/sway/issues/701/labels{/name}","comments_url":"https://api.github.com/repos/SirCmpwn/sway/issues/701/comments","events_url":"https://api.github.com/repos/SirCmpwn/sway/issues/701/events","html_url":"https://github.com/SirCmpwn/sway/pull/701","id":158663831,"number":701,"title":"messy start of a fix for #462","user":{"login":"zandrmartin","id":7629614,"avatar_url":"https://avatars.githubusercontent.com/u/7629614?v=3","gravatar_id":"","url":"https://api.github.com/users/zandrmartin","html_url":"https://github.com/zandrmartin","followers_url":"https://api.github.com/users/zandrmartin/followers","following_url":"https://api.github.com/users/zandrmartin/following{/other_user}","gists_url":"https://api.github.com/users/zandrmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/zandrmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zandrmartin/subscriptions","organizations_url":"https://api.github.com/users/zandrmartin/orgs","repos_url":"https://api.github.com/users/zandrmartin/repos","events_url":"https://api.github.com/users/zandrmartin/events{/privacy}","received_events_url":"https://api.github.com/users/zandrmartin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-06-06T12:16:43Z","updated_at":"2016-06-07T15:29:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SirCmpwn/sway/pulls/701","html_url":"https://github.com/SirCmpwn/sway/pull/701","diff_url":"https://github.com/SirCmpwn/sway/pull/701.diff","patch_url":"https://github.com/SirCmpwn/sway/pull/701.patch"},"body":"This PR is mostly for discussion - it still needs work even if you want to merge it. This is a (very messy) start on a potential fix for #462, however the problem is it's not that useful for two reasons:\r\n\r\n1. If the app is a client-server-style app, like gnome-terminal for example, the pid we get from the view is probably the pid of the client, but the pid we're looking for is that of the original process, which could be the server.\r\n2. This only works on Wayland apps. [`wl_client_get_credentials()`](https://people.freedesktop.org/~whot/wayland-doxygen/wayland/Server/structwl__client.html#a82a97cb3a66c1c56826a09a7b42453d9) returns the pid of the compositor if the forked process is connected through `socketpair()`, which is how WLC handles xwayland processes. Obviously the compositor's pid is not going to match anything.\r\n\r\nThis clearly needs some cleanup, and I need to add some code to keep focus on whatever it's on if we've changed workspaces, but it's a start."},"comment":{"url":"https://api.github.com/repos/SirCmpwn/sway/issues/comments/224317709","html_url":"https://github.com/SirCmpwn/sway/pull/701#issuecomment-224317709","issue_url":"https://api.github.com/repos/SirCmpwn/sway/issues/701","id":224317709,"user":{"login":"Cloudef","id":480330,"avatar_url":"https://avatars.githubusercontent.com/u/480330?v=3","gravatar_id":"","url":"https://api.github.com/users/Cloudef","html_url":"https://github.com/Cloudef","followers_url":"https://api.github.com/users/Cloudef/followers","following_url":"https://api.github.com/users/Cloudef/following{/other_user}","gists_url":"https://api.github.com/users/Cloudef/gists{/gist_id}","starred_url":"https://api.github.com/users/Cloudef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cloudef/subscriptions","organizations_url":"https://api.github.com/users/Cloudef/orgs","repos_url":"https://api.github.com/users/Cloudef/repos","events_url":"https://api.github.com/users/Cloudef/events{/privacy}","received_events_url":"https://api.github.com/users/Cloudef/received_events","type":"User","site_admin":false},"created_at":"2016-06-07T15:29:17Z","updated_at":"2016-06-07T15:29:17Z","body":"Not sure about broadness, xprop would show it though. At least every gtk client has it."}}
{"actor":{"display_login":"Cloudef"}}