From 1696d1f667098a2774d8b6af1454f408209b0764 Mon Sep 17 00:00:00 2001 From: nic Date: Sat, 2 Aug 2025 11:50:53 -0400 Subject: swallow.patch V0.7 applied --- client.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'client.h') diff --git a/client.h b/client.h index d9f90bb..83e1c57 100644 --- a/client.h +++ b/client.h @@ -131,6 +131,18 @@ client_get_appid(Client *c) return c->surface.xdg->toplevel->app_id ? c->surface.xdg->toplevel->app_id : "broken"; } +static inline int +client_get_pid(Client *c) +{ + pid_t pid; +#ifdef XWAYLAND + if (client_is_x11(c)) + return c->surface.xwayland->pid; +#endif + wl_client_get_credentials(c->surface.xdg->client->client, &pid, NULL, NULL); + return pid; +} + static inline void client_get_clip(Client *c, struct wlr_box *clip) { -- cgit v1.2.3