commit f48e8979d70bdb8e70b8769db5a4e18713cfb35d
parent c0d5b1d65d92eaedc7606d8ea69812d9bd40f73d
Author: seninha <lucas@seninha.org>
Date: Tue, 30 Aug 2022 11:34:16 -0300
use fitmonitor
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/shod.c b/shod.c
@@ -3053,10 +3053,7 @@ menuplace(struct Menu *menu)
struct Container *c;
c = menu->tab->row->col->c;
- if (menu->x < c->mon->wx || menu->x + menu->w >= c->mon->wx + c->mon->ww)
- menu->x = c->mon->wx;
- if (menu->y < c->mon->wy || menu->y + menu->h >= c->mon->wy + c->mon->wh)
- menu->y = c->mon->wy;
+ fitmonitor(c->mon, &menu->x, &menu->y, &menu->w, &menu->h, 0.5);
XMoveWindow(dpy, menu->frame, menu->x, menu->y);
}