diff options
author | choc <notchoc@proton.me> | 2023-09-15 10:36:21 +0800 |
---|---|---|
committer | DrNuget <drnuget@outlook.com> | 2025-01-17 10:44:21 +0200 |
commit | f442caf0305b2a8cfeb302b255f7e08463950f70 (patch) | |
tree | f84db25c56242a43feb2eb51008b69b413b1a004 /client.h | |
parent | 247544a3221087d82d6c9003e4dac54e911d5a19 (diff) |
implement swallow
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) { |