After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590388 - Add public accessor for the _NET_WM_PID property value of MetaWindow
Add public accessor for the _NET_WM_PID property value of MetaWindow
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2009-07-31 16:37 UTC by Tomas Frydrych
Modified: 2009-08-04 07:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch adding meta_window_get_net_wm_pid() function (1.46 KB, patch)
2009-07-31 16:38 UTC, Tomas Frydrych
reviewed Details | Review
Reworked patch, with accessors for both pid and client machine (2.08 KB, patch)
2009-07-31 18:02 UTC, Tomas Frydrych
committed Details | Review

Description Tomas Frydrych 2009-07-31 16:37:24 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.
Comment 1 Tomas Frydrych 2009-07-31 16:38:15 UTC
Created attachment 139639 [details] [review]
Patch adding meta_window_get_net_wm_pid() function
Comment 2 Owen Taylor 2009-07-31 17:01:39 UTC
 * 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.

Comment 3 Tomas Frydrych 2009-07-31 17:15:49 UTC
Ok, will do.
Comment 4 Dan Winship 2009-07-31 17:19:04 UTC
(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
Comment 5 Tomas Frydrych 2009-07-31 18:02:25 UTC
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.
Comment 6 Owen Taylor 2009-08-03 18:01:37 UTC
Looks good
Comment 7 Tomas Frydrych 2009-08-04 07:03:22 UTC
Committed as 8b7b41df419aca7f5471c64432dd80ea4eedbcb1.