All pastes #501427 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-22 01:38 UTC
rendered paste body
diff --git a/thumbnail.c b/thumbnail.c
index 151802c..60d28b8 100644
--- a/thumbnail.c
+++ b/thumbnail.c
@@ -358,7 +358,7 @@ thumbUpdateThumbnail (CompScreen * s)
 	}
 	tMidPoint[0] = tmpPos[0] + (ts->thumb.width / 2.0);
 
-	tmpPos[1] = WIN_Y (ts->dock) - tHeight - off;
+	tmpPos[1] = tw->ig.y - tHeight - off;
 	tMidPoint[1] = tmpPos[1] + (tHeight / 2.0);
 	if (tmpPos[1] > oy1)
 	{
@@ -368,7 +368,7 @@ thumbUpdateThumbnail (CompScreen * s)
 	}
 
 	// below
-	tmpPos[1] = WIN_Y (ts->dock) + WIN_H (ts->dock) + off;
+	tmpPos[1] = tw->ig.y + tw->ig.height + off;
 	tMidPoint[1] = tmpPos[1] + (tHeight / 2.0);
 	if (tmpPos[1] + tHeight + off < oy2 &&
 		GET_DISTANCE (igMidPoint, tMidPoint) < distance)
@@ -391,7 +391,7 @@ thumbUpdateThumbnail (CompScreen * s)
 	}
 	tMidPoint[1] = tmpPos[1] + (tHeight / 2.0);
 
-	tmpPos[0] = WIN_X (ts->dock) - ts->thumb.width - off;
+	tmpPos[0] = tw->ig.x - ts->thumb.width - off;
 	tMidPoint[0] = tmpPos[0] + (ts->thumb.width / 2.0);
 	if (tmpPos[0] > ox1 && GET_DISTANCE (igMidPoint, tMidPoint) < distance)
 	{
@@ -401,7 +401,7 @@ thumbUpdateThumbnail (CompScreen * s)
 	}
 
 	// right
-	tmpPos[0] = WIN_X (ts->dock) + WIN_W (ts->dock) + off;
+	tmpPos[0] = tw->ig.x + tw->ig.width + off;
 	tMidPoint[0] = tmpPos[0] + (ts->thumb.width / 2.0);
 	if (tmpPos[0] + ts->thumb.width + off < ox2 &&
 		GET_DISTANCE (igMidPoint, tMidPoint) < distance)