GNOME Bugzilla – Bug 590388
Add public accessor for the _NET_WM_PID property value of MetaWindow
Last modified: 2009-08-04 07:03:22 UTC
I am attaching a patch that adds meta_window_get_net_wm_pid() function, facilitating retrieval of the value of the window's _NET_WM_PID property.
Created attachment 139639 [details] [review] Patch adding meta_window_get_net_wm_pid() function
* Don't think you should export this without also exporting wm_client_machine; the PID only makes sense with regard to the client machine. (See implementation of meta_window_kill(), for exmample.) * I might have called the function meta_window_get_pid() - the fact that the PID is transferred by a property called "_NET_WM_PID" is sort of irrelevant.
Ok, will do.
(In reply to comment #2) > * Don't think you should export this without also exporting > wm_client_machine; the PID only makes sense with regard to the client > machine. (See implementation of meta_window_kill(), for exmample.) or just have it return 0/-1/error for non-local windows
Created attachment 139643 [details] [review] Reworked patch, with accessors for both pid and client machine I prefer to go with Owen suggestion, and expose both the machine and the pid.
Looks good
Committed as 8b7b41df419aca7f5471c64432dd80ea4eedbcb1.