window: Use pid_t for get_client_pid() vfunc

It makes sense to use pid_t when getting the PID since that will work on
all platforms and architectures.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1180
This commit is contained in:
Jonas Dreßler 2020-04-08 16:13:38 +02:00 committed by Florian Müllner
parent c971d6ea1f
commit bc0b9f7628
4 changed files with 7 additions and 7 deletions

View File

@ -584,7 +584,7 @@ struct _MetaWindowClass
gboolean (*update_icon) (MetaWindow *window,
cairo_surface_t **icon,
cairo_surface_t **mini_icon);
uint32_t (*get_client_pid) (MetaWindow *window);
pid_t (*get_client_pid) (MetaWindow *window);
void (*update_main_monitor) (MetaWindow *window,
MetaWindowUpdateMonitorFlags flags);
void (*main_monitor_changed) (MetaWindow *window,

View File

@ -296,7 +296,7 @@ meta_window_real_update_icon (MetaWindow *window,
return FALSE;
}
static uint32_t
static pid_t
meta_window_real_get_client_pid (MetaWindow *window)
{
return 0;
@ -7595,7 +7595,7 @@ meta_window_get_pid (MetaWindow *window)
{
g_return_val_if_fail (META_IS_WINDOW (window), 0);
return META_WINDOW_GET_CLASS (window)->get_client_pid (window);
return (uint32_t)META_WINDOW_GET_CLASS (window)->get_client_pid (window);
}
/**

View File

@ -617,7 +617,7 @@ meta_window_wayland_main_monitor_changed (MetaWindow *window,
meta_window_emit_size_changed (window);
}
static uint32_t
static pid_t
meta_window_wayland_get_client_pid (MetaWindow *window)
{
MetaWaylandSurface *surface = window->surface;
@ -625,7 +625,7 @@ meta_window_wayland_get_client_pid (MetaWindow *window)
pid_t pid;
wl_client_get_credentials (wl_resource_get_client (resource), &pid, NULL, NULL);
return (uint32_t)pid;
return pid;
}
static void

View File

@ -1779,7 +1779,7 @@ meta_window_x11_main_monitor_changed (MetaWindow *window,
{
}
static uint32_t
static pid_t
meta_window_x11_get_client_pid (MetaWindow *window)
{
MetaX11Display *x11_display = window->display->x11_display;
@ -1813,7 +1813,7 @@ meta_window_x11_get_client_pid (MetaWindow *window)
}
free (reply);
return pid;
return (pid_t) pid;
}
static void