diff options
author | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-06-20 23:46:11 -0500 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-06-21 00:23:21 -0500 |
commit | 9b84940e37ec84933d1247bbf3eb76d9efe7c589 (patch) | |
tree | 12abc41f8aab97ee90bad6adcfdba6523e1ad504 /client.h | |
parent | 79ad72413d8df7e184ff8f458d53a1f53a2cb878 (diff) |
unconstrain layer shell popups
also unconstrain popups from monitor's usable area
Diffstat (limited to 'client.h')
-rw-r--r-- | client.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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); |