summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2009-02-05 08:27:11 +0100
committerDanny Baumann <dannybaumann@web.de>2009-02-05 08:27:11 +0100
commiteb059a72e153c83a2fcabafb194580f654ff4d03 (patch)
tree0bb1527e935762fc7cf2aacc9922948c315e9794
parent8327cf45c647cc9a1a53cc806fe57ceb911d3eb9 (diff)
downloadgroup-eb059a72e153c83a2fcabafb194580f654ff4d03.tar.gz
group-eb059a72e153c83a2fcabafb194580f654ff4d03.tar.bz2
Track core changes.
-rw-r--r--tab.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/tab.c b/tab.c
index d216dc5..733c5e0 100644
--- a/tab.c
+++ b/tab.c
@@ -682,7 +682,8 @@ groupHandleAnimation (GroupSelection *group)
if (group->changeState == TabChangeOldOut)
{
- CompWindow *top = TOP_TAB (group);
+ CompWindow *top = TOP_TAB (group);
+ Bool activate;
/* recalc here is needed (for y value)! */
groupRecalcTabBarPos (group,
@@ -698,11 +699,17 @@ groupHandleAnimation (GroupSelection *group)
group->changeState = TabChangeNewIn;
- if (!group->checkFocusAfterTabChange ||
- allowWindowFocus (top, NO_FOCUS_MASK, s->x, s->y, 0))
+ activate = !group->checkFocusAfterTabChange;
+ if (!activate)
{
- (*s->activateWindow) (top);
+ CompFocusResult focus;
+ focus = allowWindowFocus (top, NO_FOCUS_MASK, s->x, s->y, 0);
+ activate = focus == CompFocusAllowed;
}
+
+ if (activate)
+ (*s->activateWindow) (top);
+
group->checkFocusAfterTabChange = FALSE;
}
@@ -1671,17 +1678,26 @@ groupChangeTab (GroupTabBarSlot *topTab,
}
else
{
+ Bool activate;
+
/* No window to do animation with. */
if (HAS_TOP_WIN (group))
group->prevTopTab = group->topTab;
else
group->prevTopTab = NULL;
- if (!group->checkFocusAfterTabChange ||
- allowWindowFocus (w, NO_FOCUS_MASK, s->x, s->y, 0))
+ activate = !group->checkFocusAfterTabChange;
+ if (!activate)
{
- (*s->activateWindow) (w);
+ CompFocusResult focus;
+
+ focus = allowWindowFocus (w, NO_FOCUS_MASK, s->x, s->y, 0);
+ activate = focus == CompFocusAllowed;
}
+
+ if (activate)
+ (*s->activateWindow) (w);
+
group->checkFocusAfterTabChange = FALSE;
}
}