summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--beryl-plugins/IPCS_NAMES5
-rw-r--r--beryl-plugins/src/animation.c14
-rw-r--r--beryl-plugins/src/scale.c18
3 files changed, 34 insertions, 3 deletions
diff --git a/beryl-plugins/IPCS_NAMES b/beryl-plugins/IPCS_NAMES
index 561908e..88ebd34 100644
--- a/beryl-plugins/IPCS_NAMES
+++ b/beryl-plugins/IPCS_NAMES
@@ -8,4 +8,7 @@ blurfx:
Bool DISABLE_MOTION_BLUR : Disable motion blur for the specific screen
splash:
- Bool SPLASH_IS_ACTIVE : Splash is active on this screen \ No newline at end of file
+ Bool SPLASH_IS_ACTIVE : Splash is active on this screen
+
+animation:
+ Bool IS_ANIMATED : This window is animated
diff --git a/beryl-plugins/src/animation.c b/beryl-plugins/src/animation.c
index 4daa646..33b3f87 100644
--- a/beryl-plugins/src/animation.c
+++ b/beryl-plugins/src/animation.c
@@ -516,6 +516,8 @@ typedef struct _AnimWindow
int unmapCnt;
int destroyCnt;
+
+ int animatedAtom;
} AnimWindow;
#define GET_ANIM_DISPLAY(d) \
@@ -2961,6 +2963,8 @@ postAnimationCleanup (CompWindow * w, Bool resetAnimation)
ANIM_WINDOW (w);
ANIM_SCREEN (w->screen);
+ IPCS_SetBool(IPCS_OBJECT(w),aw->animatedAtom,FALSE);
+
if (resetAnimation)
{
aw->curWindowEvent = WindowEventNone;
@@ -3726,6 +3730,7 @@ animHandleEvent (CompDisplay * d, XEvent * event)
if (as->shadeEffect &&
(as->shadeWMask & w->type))
{
+ IPCS_SetBool(IPCS_OBJECT(w),aw->animatedAtom,TRUE);
Bool startingNew = TRUE;
if (aw->curWindowEvent != WindowEventNone)
{
@@ -3778,6 +3783,7 @@ animHandleEvent (CompDisplay * d, XEvent * event)
//printf("MINIMIZE event! %X\n", (unsigned)aw);
+ IPCS_SetBool(IPCS_OBJECT(w),aw->animatedAtom,TRUE);
Bool startingNew = TRUE;
if (aw->curWindowEvent != WindowEventNone)
{
@@ -3861,6 +3867,7 @@ animHandleEvent (CompDisplay * d, XEvent * event)
if (windowsCloseEffect)
{
+ IPCS_SetBool(IPCS_OBJECT(w),aw->animatedAtom,TRUE);
int tmpSteps = 0;
//printf("CLOSE event! %X\n", (unsigned)aw);
@@ -4012,6 +4019,7 @@ animHandleEvent (CompDisplay * d, XEvent * event)
//printf("FOCUS event! %X\n", (unsigned)aw);
+ IPCS_SetBool(IPCS_OBJECT(w),aw->animatedAtom,TRUE);
if (aw->curWindowEvent != WindowEventNone)
{
postAnimationCleanup (w, TRUE);
@@ -4055,6 +4063,7 @@ animDamageWindowRect (CompWindow * w, Bool initial, BoxPtr rect)
//printf("UNMINIMIZE event! %X\n", (unsigned)aw);
+ IPCS_SetBool(IPCS_OBJECT(w),aw->animatedAtom,TRUE);
Bool startingNew = TRUE;
if (aw->curWindowEvent != WindowEventNone)
{
@@ -4117,6 +4126,7 @@ animDamageWindowRect (CompWindow * w, Bool initial, BoxPtr rect)
// UNSHADE event!
//printf("UNSHADE event! %X\n", (unsigned)aw);
+ IPCS_SetBool(IPCS_OBJECT(w),aw->animatedAtom,TRUE);
aw->nowShaded = FALSE;
if (as->unshadeEffect &&
@@ -4183,6 +4193,7 @@ animDamageWindowRect (CompWindow * w, Bool initial, BoxPtr rect)
//printf("CREATE event! %X\n", (unsigned)aw);
+ IPCS_SetBool(IPCS_OBJECT(w),aw->animatedAtom,TRUE);
Bool startingNew = TRUE;
if (aw->curWindowEvent != WindowEventNone)
{
@@ -4526,6 +4537,9 @@ animInitWindow (CompPlugin * p, CompWindow * w)
if (!aw)
return FALSE;
+ aw->animatedAtom=IPCS_GetAtom(IPCS_OBJECT(w),IPCS_BOOL,
+ "is_animated",True);
+ IPCS_SetBool(IPCS_OBJECT(w),aw->animatedAtom,FALSE);
aw->model = 0;
aw->state = w->state;
aw->animRemainingTime = 0;
diff --git a/beryl-plugins/src/scale.c b/beryl-plugins/src/scale.c
index 54caef6..b9634ed 100644
--- a/beryl-plugins/src/scale.c
+++ b/beryl-plugins/src/scale.c
@@ -265,6 +265,7 @@ typedef struct _ScaleWindow
GLfloat tx, ty;
float delta;
Bool adjust;
+ int animationAtom;
} ScaleWindow;
@@ -760,6 +761,18 @@ scalePaintWindow (CompWindow * w,
break;
}
+ if (IPCS_GetBool(IPCS_OBJECT(w),sw->animationAtom))
+ {
+ /*wx-=w->attrib.x;
+ wx/=sw->scale;
+ wx+=w->attrib.x;
+ wy-=w->attrib.y;
+ wy/=sw->scale;
+ wy+=w->attrib.y;*/
+ sAttrib.xScale/=sw->scale;
+ sAttrib.yScale/=sw->scale;
+ }
+
switch (ss->scaleMethod)
{
case ScaleMethodEnhanced:
@@ -810,7 +823,7 @@ scalePaintWindow (CompWindow * w,
matrix.x0 -= wx * icon->texture.matrix.xx;
matrix.y0 -= wy * icon->texture.matrix.yy;
- w->screen->setWindowScale(w,1.0,1.0);
+ //w->screen->setWindowScale(w,1.0,1.0);
w->vCount = 0;
if (iconReg.extents.x1 < iconReg.extents.x2 &&
iconReg.extents.y1 < iconReg.extents.y2)
@@ -821,7 +834,7 @@ scalePaintWindow (CompWindow * w,
(*w->screen->drawWindowTexture) (w,
&icon->texture, &sAttrib,
mask);
- w->screen->setWindowScale(w,sw->scale,sw->scale);
+ //w->screen->setWindowScale(w,sw->scale,sw->scale);
}
}
}
@@ -2755,6 +2768,7 @@ scaleInitWindow (CompPlugin * p, CompWindow * w)
if (!sw)
return FALSE;
+ sw->animationAtom=IPCS_GetAtom(IPCS_OBJECT(w),IPCS_BOOL,"is_animated",True);
sw->slot = 0;
sw->scale = 1.0f;
sw->tx = sw->ty = 0.0f;