mirror of
https://codeberg.org/FabricSoul/dwl.git
synced 2025-08-04 04:20:24 -04:00
unconstrain layer shell popups
also unconstrain popups from monitor's usable area
This commit is contained in:
parent
79ad72413d
commit
9b84940e37
2 changed files with 21 additions and 20 deletions
8
client.h
8
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue