summaryrefslogtreecommitdiffstats
path: root/x11vnc/util.c
diff options
context:
space:
mode:
authorrunge <runge>2006-01-16 21:42:49 +0000
committerrunge <runge>2006-01-16 21:42:49 +0000
commite38c3c224b19775a70c8ee5b8eddbf81be07a0bd (patch)
treedc57cd089d228a9b275babe3a855415f8bf10d9a /x11vnc/util.c
parent5993dd757e5af00af6565b3411ea10fd46eafbdf (diff)
downloadlibtdevnc-e38c3c224b19775a70c8ee5b8eddbf81be07a0bd.tar.gz
libtdevnc-e38c3c224b19775a70c8ee5b8eddbf81be07a0bd.zip
x11vnc: more tweaks to -8to24 XGETIMAGE_8TO24
Diffstat (limited to 'x11vnc/util.c')
-rw-r--r--x11vnc/util.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/x11vnc/util.c b/x11vnc/util.c
index 0d73ace..caba756 100644
--- a/x11vnc/util.c
+++ b/x11vnc/util.c
@@ -418,7 +418,7 @@ void rfbCFD(long usec) {
double rect_overlap(int x1, int y1, int x2, int y2, int X1, int Y1,
int X2, int Y2) {
double a, A, o;
- sraRegionPtr r, R, overlap;
+ sraRegionPtr r, R;
sraRectangleIterator *iter;
sraRect rt;
@@ -428,12 +428,10 @@ double rect_overlap(int x1, int y1, int x2, int y2, int X1, int Y1,
r = sraRgnCreateRect(x1, y1, x2, y2);
R = sraRgnCreateRect(X1, Y1, X2, Y2);
- overlap = sraRgnCreateRect(x1, y1, x2, y2);
-
- sraRgnAnd(overlap, R);
+ sraRgnAnd(r, R);
o = 0.0;
- iter = sraRgnGetIterator(overlap);
+ iter = sraRgnGetIterator(r);
while (sraRgnIteratorNext(iter, &rt)) {
o += nabs( (rt.x2 - rt.x1) * (rt.y2 - rt.y1) );
}
@@ -441,7 +439,6 @@ double rect_overlap(int x1, int y1, int x2, int y2, int X1, int Y1,
sraRgnDestroy(r);
sraRgnDestroy(R);
- sraRgnDestroy(overlap);
if (a < A) {
o = o/a;