diff options
| author | Johannes Herman <johannes.herman@gmail.com> | 2025-07-28 19:58:18 +0200 |
|---|---|---|
| committer | Johannes Herman <johannes.herman@gmail.com> | 2025-07-28 19:58:18 +0200 |
| commit | e172ca530c3ba2cc0b0b5e3bbe65aab078fb2942 (patch) | |
| tree | f4fa1fd85a86fba00555439b1526c59bc1253f96 /client.h | |
| parent | 1067de190423e605d68817d70b282262659eb727 (diff) | |
swallow patch
Diffstat (limited to 'client.h')
| -rw-r--r-- | client.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -131,6 +131,18 @@ client_get_appid(Client *c) return c->surface.xdg->toplevel->app_id; } +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) { |
