diff options
author | Keith Packard <keithp@neko.keithp.com> | 2007-02-08 00:50:41 -0800 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2007-02-08 00:50:41 -0800 |
commit | b54d8d406e8dc3d062ec18efb155d136401d4717 (patch) | |
tree | d8181f8e089e682a5f5f5ca6b5b647ed2de7e751 /lpdamage.c | |
parent | 7c3bd23a9276882ed2ef83a293ac1796a6a374fe (diff) |
Diffstat (limited to 'lpdamage.c')
-rw-r--r-- | lpdamage.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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 * |