general: make meta_window_get_client_pid() method public

The method meta_window_get_client_pid() returns the PID of the process that created an specific window. This PID is obtained in a secure way in Wayland with the wl_client_get_credentials() call, which makes use of getsockopt(), so a client has no way of fake them.

Currently the method is private, so this patch makes it public. This can be very useful for extensions and modules, because it allows a Wayland compositor to give specific, non-standard capabilities to a program launched by it, because it can compare the PID value obtained when it did the fork() call and the PID value returned by this call, ensuring that an specific window really belongs to the process it created.

Tested with my extension Desktop-Icons-ng under Wayland and X11 and works fine

Fixes #732 (closed)

Edited by Rastersoft

Merge request reports