summaryrefslogtreecommitdiff
path: root/lpdamage.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2007-02-08 00:50:41 -0800
committerKeith Packard <keithp@neko.keithp.com>2007-02-08 00:50:41 -0800
commitb54d8d406e8dc3d062ec18efb155d136401d4717 (patch)
treed8181f8e089e682a5f5f5ca6b5b647ed2de7e751 /lpdamage.c
parent7c3bd23a9276882ed2ef83a293ac1796a6a374fe (diff)
Add optional app-visible region to lp API.HEADmaster
Diffstat (limited to 'lpdamage.c')
-rw-r--r--lpdamage.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lpdamage.c b/lpdamage.c
index 8d4922a..066748f 100644
--- a/lpdamage.c
+++ b/lpdamage.c
@@ -84,6 +84,17 @@ _xlightpipe_damage_window (light_pipe_window *lpw, int x, int y, int width, int
old_y2 = new_y2;
lpw->public.damage.height = old_y2 - lpw->public.damage.y;
}
+ if (lpw->public.damage_region)
+ {
+ XRectangle r;
+
+ r.x = x;
+ r.y = y;
+ r.width = width;
+ r.height = height;
+ XUnionRectWithRegion (&r, lpw->public.damage_region,
+ lpw->public.damage_region);
+ }
}
void
@@ -114,6 +125,13 @@ _xlightpipe_undamage_window (light_pipe_window *lpw)
remove_damage (lpw);
lpw->public.damage.x = lpw->public.damage.y = 0;
lpw->public.damage.width = lpw->public.damage.height = 0;
+ if (lpw->public.damage_region)
+ {
+ Region empty = XCreateRegion ();
+ XIntersectRegion (lpw->public.damage_region, empty,
+ lpw->public.damage_region);
+ XDestroyRegion (empty);
+ }
}
light_pipe_window *