aboutsummaryrefslogtreecommitdiffstats
path: root/menu.c
diff options
context:
space:
mode:
authorokan2015-11-09 20:03:29 +0000
committerokan2015-11-09 20:03:29 +0000
commitcce06135af44660039026ea785a5ffdbfc277ea9 (patch)
tree428deb257ef67f9fa4e88add56ad0009f3da6ddf /menu.c
parent337fd02962f9d55347c18b20876f44d2600787ee (diff)
downloadcwm-cce06135af44660039026ea785a5ffdbfc277ea9.tar.gz
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 '')
-rw-r--r--menu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/menu.c b/menu.c
index 3ffc646..a8f4e80 100644
--- a/menu.c
+++ b/menu.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: menu.c,v 1.87 2015/07/12 14:21:09 okan Exp $
+ * $OpenBSD: menu.c,v 1.88 2015/11/09 20:03:29 okan Exp $
*/
#include <sys/types.h>
@@ -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;