summary refs log tree commit diff
path: root/menu.c
diff options
context:
space:
mode:
authorokan <okan>2015-11-09 20:03:29 +0000
committerokan <okan>2015-11-09 20:03:29 +0000
commitd7bd2998191af2ce1d6c0018e7c3a43a01ed3be5 (patch)
treef19e680cf0d8ca985fe18f66a39e273677676162 /menu.c
parent5fcf2516721dd441b435ba07f73c6315c104f5a3 (diff)
downloadcwm-d7bd2998191af2ce1d6c0018e7c3a43a01ed3be5.tar.gz
cwm-d7bd2998191af2ce1d6c0018e7c3a43a01ed3be5.tar.xz
cwm-d7bd2998191af2ce1d6c0018e7c3a43a01ed3be5.zip
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.
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/menu.c b/menu.c
index cb4ee7d..5e0dc98 100644
--- a/menu.c
+++ b/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;