summaryrefslogtreecommitdiff
path: root/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'client.h')
-rw-r--r--client.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/client.h b/client.h
index 6a870b4..012ba74 100644
--- a/client.h
+++ b/client.h
@@ -141,6 +141,28 @@ client_get_appid(Client *c)
}
static inline void
+client_get_clip(Client *c, struct wlr_box *clip)
+{
+#ifdef XWAYLAND
+ if (client_is_x11(c)) {
+ *clip = (struct wlr_box){
+ .x = 0,
+ .y = 0,
+ .width = c->geom.width - c->bw,
+ .height = c->geom.height - c->bw};
+ return;
+ }
+#endif
+
+ *clip = (struct wlr_box){
+ .x = c->surface.xdg->pending.geometry.x,
+ .y = c->surface.xdg->pending.geometry.y,
+ .width = c->geom.width - c->bw,
+ .height = c->geom.height - c->bw};
+
+}
+
+static inline void
client_get_geometry(Client *c, struct wlr_box *geom)
{
#ifdef XWAYLAND