summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/thumbnail.c
diff options
context:
space:
mode:
authoronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-05 15:18:25 +0000
committeronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-05 15:18:25 +0000
commit0c650343c3189c690dafb659d4ee4e74361f6f93 (patch)
treeb6b7ac29b5268d2721f4f7b8f2981c429eb49a37 /beryl-plugins/src/thumbnail.c
parent9a05bc446773499cff34119c16236fc764f36a3d (diff)
downloadmarex-dev-0c650343c3189c690dafb659d4ee4e74361f6f93.tar.gz
marex-dev-0c650343c3189c690dafb659d4ee4e74361f6f93.tar.bz2
beryl-plugins: fixed thumbnail position calculation
git-svn-id: file:///beryl/trunk@3676 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/thumbnail.c')
-rw-r--r--beryl-plugins/src/thumbnail.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/beryl-plugins/src/thumbnail.c b/beryl-plugins/src/thumbnail.c
index d013140..154d6b0 100644
--- a/beryl-plugins/src/thumbnail.c
+++ b/beryl-plugins/src/thumbnail.c
@@ -472,8 +472,8 @@ thumbUpdateThumbnail( CompScreen *s)
tmpPos[0] = ox1 + off;
if (tmpPos[0] + off + ts->thumb.width > ox2)
{
- if (ts->thumb.width + (2*off) - ow > 0)
- tmpPos[0] = ox2 - tmpPos[0] - off;
+ if (ts->thumb.width + (2*off) <= ow)
+ tmpPos[0] = ox2 - ts->thumb.width - off;
else
tmpPos[0] = ox1 + off;
}
@@ -505,8 +505,8 @@ thumbUpdateThumbnail( CompScreen *s)
tmpPos[1] = oy1 + off;
if (tmpPos[1] + off + tHeight > oy2)
{
- if (tHeight + (2*off) - oh > 0)
- tmpPos[1] = oy2 - tmpPos[1] - off;
+ if (tHeight + (2*off) <= oh)
+ tmpPos[1] = oy2 - ts->thumb.height - off;
else
tmpPos[1] = oy1 + off;
}