some improvements

This commit is contained in:
λmolinae 2025-03-12 08:31:40 -06:00
parent 39a44a3442
commit 49732861f9
6 changed files with 230 additions and 32 deletions

View file

@ -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)
{