mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
region is a _ctx, so name it so
This commit is contained in:
parent
66bc416217
commit
18f63629fd
32
screen.c
32
screen.c
@ -127,13 +127,13 @@ screen_updatestackingorder(struct screen_ctx *sc)
|
|||||||
struct geom
|
struct geom
|
||||||
screen_area(struct screen_ctx *sc, int x, int y, int flags)
|
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;
|
struct geom area = sc->work;
|
||||||
|
|
||||||
TAILQ_FOREACH(region, &sc->regionq, entry) {
|
TAILQ_FOREACH(rc, &sc->regionq, entry) {
|
||||||
if (x >= region->area.x && x < region->area.x+region->area.w &&
|
if ((x >= rc->area.x) && (x < (rc->area.x + rc->area.w)) &&
|
||||||
y >= region->area.y && y < region->area.y+region->area.h) {
|
(y >= rc->area.y) && (y < (rc->area.y + rc->area.h))) {
|
||||||
area = region->area;
|
area = rc->area;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,7 +145,7 @@ screen_area(struct screen_ctx *sc, int x, int y, int flags)
|
|||||||
void
|
void
|
||||||
screen_update_geometry(struct screen_ctx *sc)
|
screen_update_geometry(struct screen_ctx *sc)
|
||||||
{
|
{
|
||||||
struct region_ctx *region;
|
struct region_ctx *rc;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
sc->view.x = 0;
|
sc->view.x = 0;
|
||||||
@ -155,9 +155,9 @@ screen_update_geometry(struct screen_ctx *sc)
|
|||||||
|
|
||||||
sc->work = screen_apply_gap(sc, sc->view);
|
sc->work = screen_apply_gap(sc, sc->view);
|
||||||
|
|
||||||
while ((region = TAILQ_FIRST(&sc->regionq)) != NULL) {
|
while ((rc = TAILQ_FIRST(&sc->regionq)) != NULL) {
|
||||||
TAILQ_REMOVE(&sc->regionq, region, entry);
|
TAILQ_REMOVE(&sc->regionq, rc, entry);
|
||||||
free(region);
|
free(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HasRandr) {
|
if (HasRandr) {
|
||||||
@ -174,13 +174,13 @@ screen_update_geometry(struct screen_ctx *sc)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
region = xmalloc(sizeof(*region));
|
rc = xmalloc(sizeof(*rc));
|
||||||
region->num = i;
|
rc->num = i;
|
||||||
region->area.x = ci->x;
|
rc->area.x = ci->x;
|
||||||
region->area.y = ci->y;
|
rc->area.y = ci->y;
|
||||||
region->area.w = ci->width;
|
rc->area.w = ci->width;
|
||||||
region->area.h = ci->height;
|
rc->area.h = ci->height;
|
||||||
TAILQ_INSERT_TAIL(&sc->regionq, region, entry);
|
TAILQ_INSERT_TAIL(&sc->regionq, rc, entry);
|
||||||
|
|
||||||
XRRFreeCrtcInfo(ci);
|
XRRFreeCrtcInfo(ci);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user