summaryrefslogtreecommitdiffstats
path: root/client.h
diff options
context:
space:
mode:
authorchoc <notchoc@proton.me>2023-09-15 10:36:21 +0800
committerSquibid <me@zacharyscheiman.com>2025-02-12 17:41:44 -0600
commitfb6e9304479ca3e578db697fa0e46770ccc039de (patch)
treeea6afc69da66cd2522c9c3939acbffea4441144b /client.h
parent46453af601d7007951caafce80148ed7ede3de3d (diff)
downloaddwl-fb6e9304479ca3e578db697fa0e46770ccc039de.tar.gz
dwl-fb6e9304479ca3e578db697fa0e46770ccc039de.tar.bz2
dwl-fb6e9304479ca3e578db697fa0e46770ccc039de.zip
implement swallow
Diffstat (limited to '')
-rw-r--r--client.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/client.h b/client.h
index a2c3511..6eefa0e 100644
--- a/client.h
+++ b/client.h
@@ -134,6 +134,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)
{