mirror of
https://codeberg.org/FabricSoul/dwl.git
synced 2025-08-03 20:10:23 -04:00
add a new function to get a client from a wlr_surface
This commit is contained in:
parent
ecbc2c61db
commit
40449fa64f
2 changed files with 9 additions and 7 deletions
7
client.h
7
client.h
|
@ -231,6 +231,13 @@ client_min_size(Client *c, int *width, int *height)
|
|||
*height = state->min_height;
|
||||
}
|
||||
|
||||
static inline Client *
|
||||
client_from_wlr_surface(struct wlr_surface *surface)
|
||||
{
|
||||
struct wlr_scene_node *n = surface->data;
|
||||
return n ? n->data : NULL;
|
||||
}
|
||||
|
||||
static inline Client *
|
||||
client_from_popup(struct wlr_xdg_popup *popup)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue