summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-12-03 14:30:38 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-12-05 23:18:01 -0600
commitc56bc42eb5480783f3bc97f769bac3d9eebcb373 (patch)
tree9bd37410e67a6355834c5e3e5fb17ac1a94a1365
parent13b929d7d79a7142901d0e7035806ee7f3b7af9d (diff)
sort client_get_parent()
-rw-r--r--client.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/client.h b/client.h
index 4dc9e1a..b443a8d 100644
--- a/client.h
+++ b/client.h
@@ -37,19 +37,6 @@ client_from_wlr_surface(struct wlr_surface *s)
return NULL;
}
-static inline Client *
-client_get_parent(Client *c)
-{
-#ifdef XWAYLAND
- if (client_is_x11(c) && c->surface.xwayland->parent)
- return client_from_wlr_surface(c->surface.xwayland->parent->surface);
-#endif
- if (c->surface.xdg->toplevel->parent)
- return client_from_wlr_surface(c->surface.xdg->toplevel->parent->base->surface);
-
- return NULL;
-}
-
static inline void
client_get_size_hints(Client *c, struct wlr_box *max, struct wlr_box *min)
{
@@ -153,6 +140,19 @@ client_get_geometry(Client *c, struct wlr_box *geom)
wlr_xdg_surface_get_geometry(c->surface.xdg, geom);
}
+static inline Client *
+client_get_parent(Client *c)
+{
+#ifdef XWAYLAND
+ if (client_is_x11(c) && c->surface.xwayland->parent)
+ return toplevel_from_wlr_surface(c->surface.xwayland->parent->surface);
+#endif
+ if (c->surface.xdg->toplevel->parent)
+ return toplevel_from_wlr_surface(c->surface.xdg->toplevel->parent->base->surface);
+
+ return NULL;
+}
+
static inline const char *
client_get_title(Client *c)
{