mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-27 03:36:31 +00:00
sort client_get_parent()
This commit is contained in:
parent
13b929d7d7
commit
c56bc42eb5
1 changed files with 13 additions and 13 deletions
26
client.h
26
client.h
|
@ -37,19 +37,6 @@ client_from_wlr_surface(struct wlr_surface *s)
|
||||||
return NULL;
|
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
|
static inline void
|
||||||
client_get_size_hints(Client *c, struct wlr_box *max, struct wlr_box *min)
|
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);
|
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 *
|
static inline const char *
|
||||||
client_get_title(Client *c)
|
client_get_title(Client *c)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue