summaryrefslogtreecommitdiff
path: root/3d.c
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-09-25 09:16:10 +0200
committerDanny Baumann <dannybaumann@web.de>2007-09-25 09:16:10 +0200
commitab2f6a25b0e92b98e776d3e537aaa372f20b3e2a (patch)
tree91d4ed6f3ac530555d2af719ea42f737de6c6105 /3d.c
parent4979253035573f8136c4e62f9af52022fac82249 (diff)
download3d-ab2f6a25b0e92b98e776d3e537aaa372f20b3e2a.tar.gz
3d-ab2f6a25b0e92b98e776d3e537aaa372f20b3e2a.tar.bz2
Simplify window size calculations.
Diffstat (limited to '3d.c')
-rw-r--r--3d.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/3d.c b/3d.c
index c670d97..8ed754b 100644
--- a/3d.c
+++ b/3d.c
@@ -234,7 +234,7 @@ tdPaintWindowWithDepth (CompWindow *w,
{
Bool wasCulled;
Bool status;
- int wx, wy, wx2, wy2, ww, wh;
+ int wx, wy, ww, wh;
int bevel;
CompScreen *s = w->screen;
GLdouble point[4];
@@ -244,14 +244,11 @@ tdPaintWindowWithDepth (CompWindow *w,
wasCulled = glIsEnabled (GL_CULL_FACE);
- wx = MAX (0, MIN (s->width, w->attrib.x - w->input.left));
- wx2 = MAX (0, MIN (s->width, w->attrib.x + w->width + w->input.right));
+ wx = w->attrib.x - w->input.left;
+ wy = w->attrib.y - w->input.top;
- wy = MAX (0, MIN (s->height, w->attrib.y - w->input.top));
- wy2 = MAX (0, MIN (s->height, w->attrib.y + w->height + w->input.bottom));
-
- ww = wx2 - wx;
- wh = wy2 - wy;
+ ww = w->width + w->input.left + w->input.right;
+ wh = w->height + w->input.top + w->input.bottom;
bevel = tdGetBevel (s);