summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErkin <erkinbah@gmail.com>2007-05-12 18:13:45 +0200
committermarex <marex@beryl-project.org>2007-05-12 18:13:45 +0200
commitf201c08c4308a53da87461610d55975edcec9081 (patch)
tree51929fd8872b69891e4069c06267d5f5a9925d4c
parent46032863957248c9a34945cf33fd5e6fab4cf406 (diff)
downloadberyl-premerge-f201c08c4308a53da87461610d55975edcec9081.tar.gz
beryl-premerge-f201c08c4308a53da87461610d55975edcec9081.tar.bz2
Added compiz event for Group's tab change animation
-rw-r--r--src/group/tab.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/group/tab.c b/src/group/tab.c
index a426762..39b1128 100644
--- a/src/group/tab.c
+++ b/src/group/tab.c
@@ -641,6 +641,29 @@ void groupHandleTextFade(GroupSelection *group, int msSinceLastPaint)
}
/*
+ * groupTabChangeActivateEvent
+ *
+ * Description: Creates a compiz event to let other plugins know about
+ * the starting and ending point of the tab changing animation
+ */
+static void
+groupTabChangeActivateEvent (CompScreen *s,
+ Bool activating)
+{
+ CompOption o[2];
+
+ o[0].type = CompOptionTypeInt;
+ o[0].name = "root";
+ o[0].value.i = s->root;
+
+ o[1].type = CompOptionTypeBool;
+ o[1].name = "active";
+ o[1].value.b = activating;
+
+ (*s->display->handleCompizEvent) (s->display, "group", "tabChangeActivate", o, 2);
+}
+
+/*
* groupHandleTabChange
*
* Description:
@@ -699,6 +722,8 @@ groupHandleTabChange(CompScreen *s, GroupSelection *group)
//we use only the half time here - the second half will be PaintFadeOut
group->changeAnimationTime = groupGetChangeAnimationTime(s) * 500;
+ groupTabChangeActivateEvent(s, TRUE);
+
group->changeState = PaintFadeIn;
group->changeTab = FALSE;
@@ -754,6 +779,8 @@ groupHandleAnimation(CompScreen *s, GroupSelection *group)
if (group->changeState == PaintFadeOut && group->changeAnimationTime <= 0)
{
+ groupTabChangeActivateEvent(s, FALSE);
+
int oldChangeAnimationTime = group->changeAnimationTime;
if (group->prevTopTab)