From 9b84940e37ec84933d1247bbf3eb76d9efe7c589 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Mon, 20 Jun 2022 23:46:11 -0500 Subject: unconstrain layer shell popups also unconstrain popups from monitor's usable area --- client.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'client.h') diff --git a/client.h b/client.h index d9bb7f3..4112fd6 100644 --- a/client.h +++ b/client.h @@ -261,15 +261,17 @@ client_from_wlr_surface(struct wlr_surface *s) return NULL; } -static inline Client * -client_from_popup(struct wlr_xdg_popup *popup) +static inline void * +toplevel_from_popup(struct wlr_xdg_popup *popup) { struct wlr_xdg_surface *surface = popup->base; while (1) { switch (surface->role) { case WLR_XDG_SURFACE_ROLE_POPUP: - if (!wlr_surface_is_xdg_surface(surface->popup->parent)) + if (wlr_surface_is_layer_surface(surface->popup->parent)) + return wlr_layer_surface_v1_from_wlr_surface(surface->popup->parent)->data; + else if (!wlr_surface_is_xdg_surface(surface->popup->parent)) return NULL; surface = wlr_xdg_surface_from_wlr_surface(surface->popup->parent); -- cgit v1.2.3