mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-27 10:14:14 +00:00
Fix Popups appearing outside the window
This commit is contained in:
parent
96ce40cfe9
commit
da087b8c71
13
dwl.c
13
dwl.c
@ -882,8 +882,19 @@ createnotify(struct wl_listener *listener, void *data)
|
||||
struct wlr_xdg_surface *xdg_surface = data;
|
||||
Client *c;
|
||||
|
||||
if (xdg_surface->role != WLR_XDG_SURFACE_ROLE_TOPLEVEL)
|
||||
if (xdg_surface->role != WLR_XDG_SURFACE_ROLE_TOPLEVEL) {
|
||||
Client *sel = selclient();
|
||||
struct wlr_box pop_box =
|
||||
{
|
||||
.x = sel->geom.x - selmon->m.x,
|
||||
.y = sel->geom.y - selmon->m.y,
|
||||
.width = sel->geom.width,
|
||||
.height = sel->geom.height,
|
||||
};
|
||||
wlr_xdg_popup_unconstrain_from_box(xdg_surface->popup, &pop_box);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Allocate a Client for this surface */
|
||||
c = xdg_surface->data = calloc(1, sizeof(*c));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user