aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-03-18 01:31:28 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-03-18 01:31:28 -0600
commitd50bb97f56394cb998b96b6624342c3589828c10 (patch)
tree49fbeab145724f81832eac48b07bc3e3ef2df668 /dwl.c
parent475c13414479d1013c83309fcc4bb8a8707aa721 (diff)
parent1dfd867d9caa61d9f3fabf695a72b2fea35b6193 (diff)
Merge branch 'main' into scenegraph
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/dwl.c b/dwl.c
index d2f0718..bb3ff9a 100644
--- a/dwl.c
+++ b/dwl.c
@@ -874,8 +874,15 @@ createnotify(struct wl_listener *listener, void *data)
Client *c;
if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
+ struct wlr_box box;
xdg_surface->surface->data = wlr_scene_xdg_surface_create(
xdg_surface->popup->parent->data, xdg_surface);
+ if (!(c = client_from_popup(xdg_surface->popup)) || !c->mon)
+ return;
+ box = c->mon->m;
+ box.x -= c->geom.x;
+ box.y -= c->geom.y;
+ wlr_xdg_popup_unconstrain_from_box(xdg_surface->popup, &box);
return;
} else if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_NONE)
return;