mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
window: Use client PID for meta_window_get_pid()
The shell uses the PID of windows to map them to apps or to find out which window/app triggered a dialog. It currently fails to do that in some situations on Wayland, because meta_window_get_pid() only returns a valid PID for x11 clients. So use the client PID instead of the X11-exclusive _NET_WM_PID property to find out the PID of the process that started the window. We can do that by simply renaming the already existing meta_window_get_client_pid() API to meta_window_get_pid() and moving the old API providing the _NET_WM_PID to meta_window_get_netwm_pid(). https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1180
This commit is contained in:

committed by
Florian Müllner

parent
11f224f4b0
commit
dac09a8e23
@ -328,7 +328,7 @@ META_EXPORT
|
||||
guint32 meta_window_get_user_time (MetaWindow *window);
|
||||
|
||||
META_EXPORT
|
||||
int meta_window_get_pid (MetaWindow *window);
|
||||
uint32_t meta_window_get_pid (MetaWindow *window);
|
||||
|
||||
META_EXPORT
|
||||
const char *meta_window_get_client_machine (MetaWindow *window);
|
||||
|
Reference in New Issue
Block a user