mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-27 03:36:31 +00:00
handle client_from_wlr_surface() receiving a subsurface
This commit is contained in:
parent
48396a1bf8
commit
28af37cd1f
1 changed files with 3 additions and 0 deletions
3
client.h
3
client.h
|
@ -30,6 +30,7 @@ static inline Client *
|
|||
client_from_wlr_surface(struct wlr_surface *s)
|
||||
{
|
||||
struct wlr_xdg_surface *surface;
|
||||
struct wlr_surface *parent;
|
||||
|
||||
#ifdef XWAYLAND
|
||||
struct wlr_xwayland_surface *xsurface;
|
||||
|
@ -42,6 +43,8 @@ client_from_wlr_surface(struct wlr_surface *s)
|
|||
&& surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL)
|
||||
return surface->data;
|
||||
|
||||
if (s && wlr_surface_is_subsurface(s))
|
||||
return client_from_wlr_surface(wlr_surface_get_root_surface(s));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue