Extend region to include both view and work areas; switch to
region_find() which no longer needs to recalculate gap each time a client (or menu) is created or altered. If no RandR, fall back to display dimensions while building regions instead of during execution.
This commit is contained in:
4
menu.c
4
menu.c
@@ -331,6 +331,7 @@ static void
|
||||
menu_draw(struct menu_ctx *mc, struct menu_q *menuq, struct menu_q *resultq)
|
||||
{
|
||||
struct screen_ctx *sc = mc->sc;
|
||||
struct region_ctx *rc;
|
||||
struct menu *mi;
|
||||
struct geom area;
|
||||
int n, xsave, ysave;
|
||||
@@ -371,7 +372,8 @@ menu_draw(struct menu_ctx *mc, struct menu_q *menuq, struct menu_q *resultq)
|
||||
mc->num++;
|
||||
}
|
||||
|
||||
area = screen_area(sc, mc->geom.x, mc->geom.y, CWM_GAP);
|
||||
rc = region_find(sc, mc->geom.x, mc->geom.y);
|
||||
area = rc->work;
|
||||
area.w += area.x - Conf.bwidth * 2;
|
||||
area.h += area.y - Conf.bwidth * 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user