summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/miniview.c
diff options
context:
space:
mode:
authorracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-02 19:09:28 +0000
committerracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-02 19:09:28 +0000
commit0e042addb8f7c3c8797abd4389e62c7818e59322 (patch)
tree3755098af26f18e6ff9462b823872b2fa38d60d6 /beryl-plugins/src/miniview.c
parent726770500c1589d5a6afe9e3b618643682fe6fbe (diff)
downloadmarex-dev-0e042addb8f7c3c8797abd4389e62c7818e59322.tar.gz
marex-dev-0e042addb8f7c3c8797abd4389e62c7818e59322.tar.bz2
Make default miniview size smaller and compensate for variable sizes, adding resizing in just a bit
git-svn-id: file:///beryl/trunk@3578 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/miniview.c')
-rw-r--r--beryl-plugins/src/miniview.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/beryl-plugins/src/miniview.c b/beryl-plugins/src/miniview.c
index ad34fb1..51c5536 100644
--- a/beryl-plugins/src/miniview.c
+++ b/beryl-plugins/src/miniview.c
@@ -158,6 +158,12 @@ static void miniviewPaintTransformedScreen(CompScreen * s,
ScreenPaintAttrib * sa = sAttrib;
glScalef(1.0f,1.0f,1.0f*-ms->zCam);
glTranslatef(-1.0,1.0,0);
+
+ float compensation;
+ compensation = ms->size - 2.0f;
+ compensation /= 2;
+ glTranslatef(-compensation,compensation,0);
+
glTranslatef(1/((float)s->outputDev[output].width/(float)ms->miniX)*-ms->zCam,
-1/((float)s->outputDev[output].height/(float)ms->miniY)*-ms->zCam,
0);
@@ -319,7 +325,7 @@ static Bool miniviewInitScreen(CompPlugin * p, CompScreen * s)
ms->miniX = ms->miniY = ms->miniViewport = ms->showing = ms->zCam =
ms->moveStep = 0;
- ms->size = 2;
+ ms->size = 3.0;
addScreenAction(s, &md->opt[MINIVIEW_DISPLAY_OPTION_CREATE].value.action);
addScreenAction(s, &md->opt[MINIVIEW_DISPLAY_OPTION_MOVE].value.action);