From 98026635c53e85dbe05fab0c1c8460a4ddd1b51d Mon Sep 17 00:00:00 2001 From: Ryan McBride Date: Fri, 12 Nov 2010 01:35:01 +0000 Subject: [PATCH] Instead of dying when a manually defined region is outside of screen boundaries, just ignore the region. Lets you at least log in and run xrandr to fix the screen, then M-q to apply the manual region. --- scrotwm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scrotwm.c b/scrotwm.c index eb917a4..33de7c2 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -1040,10 +1040,12 @@ custom_region(char *val) if (x < 0 || x > DisplayWidth(display, sidx) || y < 0 || y > DisplayHeight(display, sidx) || w + x > DisplayWidth(display, sidx) || - h + y > DisplayHeight(display, sidx)) - errx(1, "region %ux%u+%u+%u not within screen boundaries " + h + y > DisplayHeight(display, sidx)) { + fprintf(stderr, "ignoring region %ux%u+%u+%u - not within screen boundaries " "(%ux%u)\n", w, h, x, y, DisplayWidth(display, sidx), DisplayHeight(display, sidx)); + return; + } new_region(&screens[sidx], x, y, w, h); } -- 1.7.10.4