mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
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:
parent
c971d6ea1f
commit
bc0b9f7628
@ -584,7 +584,7 @@ struct _MetaWindowClass
|
|||||||
gboolean (*update_icon) (MetaWindow *window,
|
gboolean (*update_icon) (MetaWindow *window,
|
||||||
cairo_surface_t **icon,
|
cairo_surface_t **icon,
|
||||||
cairo_surface_t **mini_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,
|
void (*update_main_monitor) (MetaWindow *window,
|
||||||
MetaWindowUpdateMonitorFlags flags);
|
MetaWindowUpdateMonitorFlags flags);
|
||||||
void (*main_monitor_changed) (MetaWindow *window,
|
void (*main_monitor_changed) (MetaWindow *window,
|
||||||
|
@ -296,7 +296,7 @@ meta_window_real_update_icon (MetaWindow *window,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t
|
static pid_t
|
||||||
meta_window_real_get_client_pid (MetaWindow *window)
|
meta_window_real_get_client_pid (MetaWindow *window)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@ -7595,7 +7595,7 @@ meta_window_get_pid (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (META_IS_WINDOW (window), 0);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -617,7 +617,7 @@ meta_window_wayland_main_monitor_changed (MetaWindow *window,
|
|||||||
meta_window_emit_size_changed (window);
|
meta_window_emit_size_changed (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t
|
static pid_t
|
||||||
meta_window_wayland_get_client_pid (MetaWindow *window)
|
meta_window_wayland_get_client_pid (MetaWindow *window)
|
||||||
{
|
{
|
||||||
MetaWaylandSurface *surface = window->surface;
|
MetaWaylandSurface *surface = window->surface;
|
||||||
@ -625,7 +625,7 @@ meta_window_wayland_get_client_pid (MetaWindow *window)
|
|||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
||||||
wl_client_get_credentials (wl_resource_get_client (resource), &pid, NULL, NULL);
|
wl_client_get_credentials (wl_resource_get_client (resource), &pid, NULL, NULL);
|
||||||
return (uint32_t)pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -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)
|
meta_window_x11_get_client_pid (MetaWindow *window)
|
||||||
{
|
{
|
||||||
MetaX11Display *x11_display = window->display->x11_display;
|
MetaX11Display *x11_display = window->display->x11_display;
|
||||||
@ -1813,7 +1813,7 @@ meta_window_x11_get_client_pid (MetaWindow *window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
free (reply);
|
free (reply);
|
||||||
return pid;
|
return (pid_t) pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user