summary refs log tree commit diff
path: root/screen.c
diff options
context:
space:
mode:
authorokan <okan>2015-06-26 18:54:25 +0000
committerokan <okan>2015-06-26 18:54:25 +0000
commit18f63629fdb322e2bd9d39972bf28c3bc96d0942 (patch)
treebbd5079d43237488f9f4a4279844c36a5b507491 /screen.c
parent66bc4162170b72f192c156b692b621643f1e5d52 (diff)
downloadcwm-18f63629fdb322e2bd9d39972bf28c3bc96d0942.tar.gz
cwm-18f63629fdb322e2bd9d39972bf28c3bc96d0942.tar.xz
cwm-18f63629fdb322e2bd9d39972bf28c3bc96d0942.zip
region is a _ctx, so name it so
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/screen.c b/screen.c
index 14d0b5c..81712ab 100644
--- a/screen.c
+++ b/screen.c
@@ -127,13 +127,13 @@ screen_updatestackingorder(struct screen_ctx *sc)
 struct geom
 screen_area(struct screen_ctx *sc, int x, int y, int flags)
 {
-	struct region_ctx	*region;
+	struct region_ctx	*rc;
 	struct geom		 area = sc->work;
 
-	TAILQ_FOREACH(region, &sc->regionq, entry) {
-		if (x >= region->area.x && x < region->area.x+region->area.w &&
-		    y >= region->area.y && y < region->area.y+region->area.h) {
-			area = region->area;
+	TAILQ_FOREACH(rc, &sc->regionq, entry) {
+		if ((x >= rc->area.x) && (x < (rc->area.x + rc->area.w)) &&
+		    (y >= rc->area.y) && (y < (rc->area.y + rc->area.h))) {
+			area = rc->area;
 			break;
 		}
 	}
@@ -145,7 +145,7 @@ screen_area(struct screen_ctx *sc, int x, int y, int flags)
 void
 screen_update_geometry(struct screen_ctx *sc)
 {
-	struct region_ctx	*region;
+	struct region_ctx	*rc;
 	int			 i;
 
 	sc->view.x = 0;
@@ -155,9 +155,9 @@ screen_update_geometry(struct screen_ctx *sc)
 
 	sc->work = screen_apply_gap(sc, sc->view);
 
-	while ((region = TAILQ_FIRST(&sc->regionq)) != NULL) {
-		TAILQ_REMOVE(&sc->regionq, region, entry);
-		free(region);
+	while ((rc = TAILQ_FIRST(&sc->regionq)) != NULL) {
+		TAILQ_REMOVE(&sc->regionq, rc, entry);
+		free(rc);
 	}
 
 	if (HasRandr) {
@@ -174,13 +174,13 @@ screen_update_geometry(struct screen_ctx *sc)
 				continue;
 			}
 
-			region = xmalloc(sizeof(*region));
-			region->num = i;
-			region->area.x = ci->x;
-			region->area.y = ci->y;
-			region->area.w = ci->width;
-			region->area.h = ci->height;
-			TAILQ_INSERT_TAIL(&sc->regionq, region, entry);
+			rc = xmalloc(sizeof(*rc));
+			rc->num = i;
+			rc->area.x = ci->x;
+			rc->area.y = ci->y;
+			rc->area.w = ci->width;
+			rc->area.h = ci->height;
+			TAILQ_INSERT_TAIL(&sc->regionq, rc, entry);
 
 			XRRFreeCrtcInfo(ci);
 		}