window: Return pid_t in meta_window_get_pid()
Just as with the last commit, pid_t is compatible with all platforms and we should use that everywhere, so also make meta_window_get_pid() return a pid_t. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1180
This commit is contained in:
parent
bc0b9f7628
commit
70ba844c3c
@ -898,13 +898,13 @@ meta_window_update_snap_id (MetaWindow *window,
|
||||
static void
|
||||
meta_window_update_sandboxed_app_id (MetaWindow *window)
|
||||
{
|
||||
uint32_t pid;
|
||||
pid_t pid;
|
||||
|
||||
g_clear_pointer (&window->sandboxed_app_id, g_free);
|
||||
|
||||
pid = meta_window_get_pid (window);
|
||||
|
||||
if (pid == 0)
|
||||
if (pid < 1)
|
||||
return;
|
||||
|
||||
if (meta_window_update_flatpak_id (window, pid))
|
||||
@ -7590,12 +7590,12 @@ meta_window_get_transient_for (MetaWindow *window)
|
||||
*
|
||||
* Return value: the pid, or 0 if not known.
|
||||
*/
|
||||
uint32_t
|
||||
pid_t
|
||||
meta_window_get_pid (MetaWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (META_IS_WINDOW (window), 0);
|
||||
|
||||
return (uint32_t)META_WINDOW_GET_CLASS (window)->get_client_pid (window);
|
||||
return META_WINDOW_GET_CLASS (window)->get_client_pid (window);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -328,7 +328,7 @@ META_EXPORT
|
||||
guint32 meta_window_get_user_time (MetaWindow *window);
|
||||
|
||||
META_EXPORT
|
||||
uint32_t meta_window_get_pid (MetaWindow *window);
|
||||
pid_t meta_window_get_pid (MetaWindow *window);
|
||||
|
||||
META_EXPORT
|
||||
const char *meta_window_get_client_machine (MetaWindow *window);
|
||||
|
Loading…
Reference in New Issue
Block a user