add a new function to get a client from a wlr_surface
This commit is contained in:
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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user