summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-13 18:48:41 +0000
committeronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-13 18:48:41 +0000
commit47ae0e5fa89925c584d57d7cb4b99cbd233f8e21 (patch)
tree3d9c8cdb305ea0f842e85527d913215ae3979528
parent6e8fcaaa1600fde44365e82afe4450444a209a41 (diff)
downloadmarex-dev-47ae0e5fa89925c584d57d7cb4b99cbd233f8e21.tar.gz
marex-dev-47ae0e5fa89925c584d57d7cb4b99cbd233f8e21.tar.bz2
beryl-plugins: 3d: fixed depth painting
git-svn-id: file:///beryl/trunk@4037 d7aaf104-2d23-0410-ae22-9d23157bf5a3
-rw-r--r--beryl-plugins/src/3d.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/beryl-plugins/src/3d.c b/beryl-plugins/src/3d.c
index 76ceb13..a73bd55 100644
--- a/beryl-plugins/src/3d.c
+++ b/beryl-plugins/src/3d.c
@@ -619,14 +619,14 @@ tdPaintWindow(CompWindow * w,
int wx, wy, wx2, wy2, ww, wh;
- wx = MIN(w->screen->width, w->attrib.x - w->input.left);
- wx2 = MIN(w->screen->width, w->attrib.x + w->attrib.width + w->input.right);
+ wx = MAX(0,MIN(w->screen->width, w->attrib.x - w->input.left));
+ wx2 = MAX(0,MIN(w->screen->width, w->attrib.x + w->attrib.width + w->input.right));
- wy = MIN(w->screen->height, w->attrib.y - w->input.top);
- wy2 = MIN(w->screen->height, w->attrib.y + w->attrib.height + w->input.bottom);
+ wy = MAX(0,MIN(w->screen->height, w->attrib.y - w->input.top));
+ wy2 = MAX(0,MIN(w->screen->height, w->attrib.y + w->attrib.height + w->input.bottom));
- ww = MAX(0, wx2) - MAX(0, wx);
- wh = MAX(0, wy2) - MAX(0, wy);
+ ww = wx2 - wx;
+ wh = wy2 - wy;
float wwidth = -(tds->opt[TD_SCREEN_OPTION_WIDTH].value.f) / 30;
int bevel = tds->opt[TD_SCREEN_OPTION_BEVEL].value.i;