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)