summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxsacha <xsacha@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-13 12:48:43 +0000
committerxsacha <xsacha@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-13 12:48:43 +0000
commit62ef7ad35846463531dbcbd5d47c11adf885770d (patch)
tree7f993d5896c012a4256c0278b1d9452726da79af
parent47ef8069631d16dfda8c7f31da009b7e410b6f73 (diff)
downloadmarex-dev-62ef7ad35846463531dbcbd5d47c11adf885770d.tar.gz
marex-dev-62ef7ad35846463531dbcbd5d47c11adf885770d.tar.bz2
beryl-plugins: 3d: Fix typos, add to todo list, change some stuff, remove redundancies.
git-svn-id: file:///beryl/trunk@4026 d7aaf104-2d23-0410-ae22-9d23157bf5a3
-rw-r--r--beryl-plugins/src/3d.c68
1 files changed, 26 insertions, 42 deletions
diff --git a/beryl-plugins/src/3d.c b/beryl-plugins/src/3d.c
index 9e7d114..89453ae 100644
--- a/beryl-plugins/src/3d.c
+++ b/beryl-plugins/src/3d.c
@@ -30,6 +30,7 @@ TODO:
6. Fix bugs with 3d + animations / wobbly.
- Wobbly will draw the window twice if its in 2 different viewports.
- Many Bugs with animations, some are solvable by changing the load order, but it will result with clipping when animations are done.
+ 7. *High priority* Fix windows in 3D appearing a second time to the left of their real position.
*/
#define _GNU_SOURCE
@@ -77,20 +78,20 @@ TODO:
#define TD_SCREEN_OPTION_MANUAL_ONLY_DEFAULT TRUE
-#define TD_SCREEN_OPTION_SPACE 0
-#define TD_SCREEN_OPTION_SPEED 1
-#define TD_SCREEN_OPTION_CREATE_MIPMAPS 2
-#define TD_SCREEN_OPTION_DISABLE_BACKFACE_CULLING 3
+#define TD_SCREEN_OPTION_SPACE 0
+#define TD_SCREEN_OPTION_SPEED 1
+#define TD_SCREEN_OPTION_CREATE_MIPMAPS 2
+#define TD_SCREEN_OPTION_DISABLE_BACKFACE_CULLING 3
#define TD_SCREEN_OPTION_DISABLE_CAPS_IN_INSIDE_CUBE 4
-#define TD_SCREEN_OPTION_MANUAL_ONLY 5
-#define TD_SCREEN_OPTION_WIDTH 6
-#define TD_SCREEN_OPTION_BEVEL 7
-#define TD_SCREEN_OPTION_BEVEL_TOPRIGHT 8
-#define TD_SCREEN_OPTION_BEVEL_TOPLEFT 9
-#define TD_SCREEN_OPTION_BEVEL_BOTTOMRIGHT 10
-#define TD_SCREEN_OPTION_BEVEL_BOTTOMLEFT 11
-#define TD_SCREEN_OPTION_DEPTH 12
-#define TD_SCREEN_OPTION_NUM 13
+#define TD_SCREEN_OPTION_MANUAL_ONLY 5
+#define TD_SCREEN_OPTION_WIDTH 6
+#define TD_SCREEN_OPTION_BEVEL 7
+#define TD_SCREEN_OPTION_BEVEL_TOPRIGHT 8
+#define TD_SCREEN_OPTION_BEVEL_TOPLEFT 9
+#define TD_SCREEN_OPTION_BEVEL_BOTTOMRIGHT 10
+#define TD_SCREEN_OPTION_BEVEL_BOTTOMLEFT 11
+#define TD_SCREEN_OPTION_DEPTH 12
+#define TD_SCREEN_OPTION_NUM 13
#define GETBEVEL(corner) \
tds->opt[TD_SCREEN_OPTION_BEVEL_##corner].value.b
@@ -562,12 +563,8 @@ tdPaintWindow(CompWindow * w,
if (mask & PAINT_WINDOW_BACK_TO_FRONT_MASK)
return TRUE;
}
-
- else
- {
- if (mask & PAINT_WINDOW_FRONT_TO_BACK_MASK)
- return TRUE;
- }
+ else if (mask & PAINT_WINDOW_FRONT_TO_BACK_MASK)
+ return TRUE;
}
@@ -613,36 +610,23 @@ tdPaintWindow(CompWindow * w,
if ((LEFT_VIEWPORT(w) != RIGHT_VIEWPORT(w)) && !IPCS_GetBool(IPCS_OBJECT(w->screen),tds->unfoldedAtom))
{
- if (LEFT_VIEWPORT(w) == 0 && 1)
- {
+ if (LEFT_VIEWPORT(w) == 0)
matrixTranslate(&wTransform, width * tdw->currentZ * tds->xMove, 0.0f, 0.0f);
- }
- if (RIGHT_VIEWPORT(w) == 0 && 1)
- {
+ if (RIGHT_VIEWPORT(w) == 0)
matrixTranslate(&wTransform, -width * tdw->currentZ * tds->xMove, 0.0f, 0.0f);
- }
}
int wx, wy, wx2, wy2, ww, wh;
- wx = w->attrib.x - w->input.left;
- wy = w->attrib.y - w->input.top;
- wx2 = wx + w->attrib.width + w->input.left + w->input.right;
- wy2 = wy + w->attrib.height + w->input.top + w->input.bottom;
-
- wx = MIN(w->screen->width,wx);
- wx = MAX(0,wx);
- wx2 = MIN(w->screen->width,wx2);
- wx2 = MAX(0,wx2);
+ 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);
- wy = MIN(w->screen->height,wy);
- wy = MAX(0,wy);
- wy2 = MIN(w->screen->height,wy2);
- wy2 = MAX(0,wy2);
+ 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);
- ww = wx2 - wx;
- wh = wy2 - wy;
+ ww = MAX(0, wx2) - MAX(0, wx);
+ wh = MAX(0, wy2) - MAX(0, wy);
float wwidth = -(tds->opt[TD_SCREEN_OPTION_WIDTH].value.f) / 30;
int bevel = tds->opt[TD_SCREEN_OPTION_BEVEL].value.i;
@@ -1077,7 +1061,7 @@ static void tdScreenInitOptions(tdScreen * tds)
o->group = N_("Misc. Settings");
o->subGroup = N_("");
o->advanced = True;
- o->shortDesc = N_("Disable Caps in Cube");
+ o->shortDesc = N_("Disable Caps for Inside Cube");
o->longDesc =
N_
("Disables the drawing of the cube caps when the inside cube mode is set.");
@@ -1353,7 +1337,7 @@ CompPluginDep tdDeps[] = {
static CompPluginVTable tdVTable = {
"3d",
N_("3D Effects"),
- N_("Windows aquire 3D Effects"),
+ N_("Windows acquire 3D Effects"),
tdInit,
tdFini,
tdInitDisplay,