summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/inputzoom.c
diff options
context:
space:
mode:
authorracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-24 10:58:19 +0000
committerracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-24 10:58:19 +0000
commit045ba4cb32fa3e1c16216ff8809bd40db9c2ed77 (patch)
treea5f6f2d27646d56bdcf42ddc15c05ce8da8c25e4 /beryl-plugins/src/inputzoom.c
parentcf2abe773b6536e55c6d76d5444fac69ccf70773 (diff)
downloadmarex-dev-045ba4cb32fa3e1c16216ff8809bd40db9c2ed77.tar.gz
marex-dev-045ba4cb32fa3e1c16216ff8809bd40db9c2ed77.tar.bz2
indent.sh on plugins
git-svn-id: file:///beryl/trunk@3081 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/inputzoom.c')
-rw-r--r--beryl-plugins/src/inputzoom.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/beryl-plugins/src/inputzoom.c b/beryl-plugins/src/inputzoom.c
index 208971b..30c96cf 100644
--- a/beryl-plugins/src/inputzoom.c
+++ b/beryl-plugins/src/inputzoom.c
@@ -494,9 +494,9 @@ zoomApplyScreenTransform(CompScreen * s,
if (zs->active && (!pCaps || !(*pCaps)))
{
- float ox,oy,ow,oh;
+ float ox, oy, ow, oh;
- int mmMode = IPCS_GetIntND(IPCS_OBJECT(s),"MM_MODE",0);
+ int mmMode = IPCS_GetIntND(IPCS_OBJECT(s), "MM_MODE", 0);
if (mmMode == 1)
{
@@ -515,6 +515,7 @@ zoomApplyScreenTransform(CompScreen * s,
float tx = zs->mouseX - (ox + (ow / 2.0));
float ty = zs->mouseY - (oy + (oh / 2.0));
+
tx /= ow;
tx = -(tx * (zs->xscale - 1));
ty /= oh;
@@ -525,8 +526,7 @@ zoomApplyScreenTransform(CompScreen * s,
}
}
-static Bool
-zoomUpdateMouse (void *vs)
+static Bool zoomUpdateMouse(void *vs)
{
CompScreen *s = (CompScreen *) vs;
@@ -542,9 +542,8 @@ zoomUpdateMouse (void *vs)
Window child_return;
XQueryPointer(s->display->display, s->root,
- &root_return, &child_return,
- &rootX, &rootY, &winX,
- &winY, &mask_return);
+ &root_return, &child_return,
+ &rootX, &rootY, &winX, &winY, &mask_return);
if (rootX != zs->mouseX || rootY != zs->mouseY)
{
@@ -555,8 +554,8 @@ zoomUpdateMouse (void *vs)
}
zs->mouseTimeout =
- compAddTimeout(zs->opt[ZOOM_SCREEN_OPTION_MOUSE_UPDATE].value.i,
- zoomUpdateMouse, s);
+ compAddTimeout(zs->opt[ZOOM_SCREEN_OPTION_MOUSE_UPDATE].value.i,
+ zoomUpdateMouse, s);
return FALSE;
}
@@ -565,8 +564,8 @@ static void zoomPreparePaintScreen(CompScreen * s, int msSinceLastPaint)
ZOOM_SCREEN(s);
ZOOM_DISPLAY(s->display);
- if (screenGrabExist (s, "rotate","cube",0) &&
- zs->opt[ZOOM_SCREEN_OPTION_OUT_ON_CUBE].value.b)
+ if (screenGrabExist(s, "rotate", "cube", 0) &&
+ zs->opt[ZOOM_SCREEN_OPTION_OUT_ON_CUBE].value.b)
zs->toScale = 1.0f;
else
zs->toScale = zs->newScale;
@@ -600,7 +599,7 @@ static void zoomPreparePaintScreen(CompScreen * s, int msSinceLastPaint)
zs->yscale = zs->currentScale;
if (zs->currentScale == 1.0f && zs->zVelocity == 0.0f &&
- zs->newScale == 1.0)
+ zs->newScale == 1.0)
{
zs->active = FALSE;
if (zs->mouseTimeout)
@@ -614,7 +613,7 @@ static void zoomPreparePaintScreen(CompScreen * s, int msSinceLastPaint)
}
if (zs->currentScale == 1.0f && zs->zVelocity == 0.0f &&
- zs->newScale == 1.0)
+ zs->newScale == 1.0)
{
zs->active = FALSE;
if (zs->mouseTimeout)
@@ -709,8 +708,8 @@ zoomPaintTransformedScreen(CompScreen * s, const ScreenPaintAttrib * sa,
r.rects = &r.extents;
r.numRects = 1;
- if (screenGrabExist (s, "rotate","cube",0) &&
- IPCS_GetIntND(IPCS_OBJECT(s),"MM_MODE",0) == 1)
+ if (screenGrabExist(s, "rotate", "cube", 0) &&
+ IPCS_GetIntND(IPCS_OBJECT(s), "MM_MODE", 0) == 1)
{
r.extents.x1 = zs->mouseX - (zs->mouseX / zs->xscale);
r.extents.y1 = zs->mouseY - (zs->mouseY / zs->yscale);
@@ -730,10 +729,10 @@ zoomPaintTransformedScreen(CompScreen * s, const ScreenPaintAttrib * sa,
}
- r.extents.x1 = MAX(0,r.extents.x1);
- r.extents.y1 = MAX(0,r.extents.y1);
- r.extents.x2 = MIN(s->width,r.extents.x2);
- r.extents.y2 = MIN(s->height,r.extents.y2);
+ r.extents.x1 = MAX(0, r.extents.x1);
+ r.extents.y1 = MAX(0, r.extents.y1);
+ r.extents.x2 = MIN(s->width, r.extents.x2);
+ r.extents.y2 = MIN(s->height, r.extents.y2);
UNWRAP(zs, s, paintTransformedScreen);
(*s->paintTransformedScreen) (s, sa, &r, output, mask);
@@ -801,8 +800,8 @@ zoomIn(CompDisplay * d,
if (!zs->mouseTimeout)
zs->mouseTimeout =
- compAddTimeout(zs->opt[ZOOM_SCREEN_OPTION_MOUSE_UPDATE].value.i,
- zoomUpdateMouse, s);
+ compAddTimeout(zs->opt[ZOOM_SCREEN_OPTION_MOUSE_UPDATE].
+ value.i, zoomUpdateMouse, s);
if (zd->fixesSupported && !zs->cursorInfoSelected && zs->showScaled)
{
@@ -848,8 +847,8 @@ zoomOut(CompDisplay * d,
if (!zs->mouseTimeout)
zs->mouseTimeout =
- compAddTimeout(zs->opt[ZOOM_SCREEN_OPTION_MOUSE_UPDATE].value.i,
- zoomUpdateMouse, s);
+ compAddTimeout(zs->opt[ZOOM_SCREEN_OPTION_MOUSE_UPDATE].
+ value.i, zoomUpdateMouse, s);
if (zd->fixesSupported && !zs->cursorInfoSelected && zs->showScaled)
{
@@ -1145,7 +1144,8 @@ static void zoomFini(CompPlugin * p)
}
CompPluginDep zoomDeps[] = {
- {CompPluginRuleBefore, "cube"},
+ {CompPluginRuleBefore, "cube"}
+ ,
};
CompPluginFeature zoomFeatures[] = {