summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/group
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-18 14:28:54 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-18 14:28:54 +0000
commit1c470b5b44d9b791b4f1c8204978dee75d1f2572 (patch)
treef04c9d3536424a67e66965063524486080ec0557 /beryl-plugins/src/group
parentefce1182d3f30b4aa0351462a3279de8c9438183 (diff)
downloadmarex-dev-1c470b5b44d9b791b4f1c8204978dee75d1f2572.tar.gz
marex-dev-1c470b5b44d9b791b4f1c8204978dee75d1f2572.tar.bz2
group plugin:
- attempt to fix input prevention leakages by unmapping them when a top tab is unmapped - fix visible tab bars detection git-svn-id: file:///beryl/trunk@2838 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/group')
-rw-r--r--beryl-plugins/src/group/group.c14
-rw-r--r--beryl-plugins/src/group/group.h1
-rw-r--r--beryl-plugins/src/group/paint.c11
-rw-r--r--beryl-plugins/src/group/tab.c7
4 files changed, 24 insertions, 9 deletions
diff --git a/beryl-plugins/src/group/group.c b/beryl-plugins/src/group/group.c
index b67f170..a49b855 100644
--- a/beryl-plugins/src/group/group.c
+++ b/beryl-plugins/src/group/group.c
@@ -851,10 +851,16 @@ void groupHandleEvent(CompDisplay * d, XEvent * event)
break;
GROUP_WINDOW(w);
- // close event
- if (gw->group && !w->pendingUnmaps) {
- groupDeleteGroupWindow(d, w);
- damageScreen(w->screen);
+ if (gw->group) {
+ if (!w->pendingUnmaps) {
+ //close event
+ groupDeleteGroupWindow(d, w);
+ damageScreen(w->screen);
+ } else if (gw->group->tabBar && IS_TOP_TAB(w, gw->group)) {
+ /* on unmap of the top tab, hide the tab bar and the
+ input prevention window */
+ groupTabSetVisibility(gw->group, FALSE, PERMANENT);
+ }
}
break;
}
diff --git a/beryl-plugins/src/group/group.h b/beryl-plugins/src/group/group.h
index 16fabc8..482f24f 100644
--- a/beryl-plugins/src/group/group.h
+++ b/beryl-plugins/src/group/group.h
@@ -515,6 +515,7 @@ Bool groupDamageWindowRect(CompWindow * w, Bool initial, BoxPtr rect);
void groupHandleChanges(CompScreen* s);
void groupDrawTabAnimation(CompScreen * s, int msSinceLastPaint);
Bool groupUpdateTabBars(void* display);
+void groupCheckForVisibleTabBars(CompDisplay *d);
void groupTabSetVisibility(GroupSelection *group, Bool visible, unsigned int mask);
void groupMoveTabOffscreen(CompWindow* w, GroupSelection* group, Bool offscreen);
void groupGetCurrentMousePosition(CompDisplay *d, int *x, int *y);
diff --git a/beryl-plugins/src/group/paint.c b/beryl-plugins/src/group/paint.c
index 9758185..1d79ba3 100644
--- a/beryl-plugins/src/group/paint.c
+++ b/beryl-plugins/src/group/paint.c
@@ -609,6 +609,7 @@ void groupPreparePaintScreen(CompScreen * s, int msSinceLastPaint)
GROUP_SCREEN(s);
GROUP_DISPLAY(s->display);
GroupSelection *group;
+ Bool changedTabBarState = FALSE;
UNWRAP(gs, s, preparePaintScreen);
(*s->preparePaintScreen) (s, msSinceLastPaint);
@@ -633,10 +634,13 @@ void groupPreparePaintScreen(CompScreen * s, int msSinceLastPaint)
group->tabBar->animationTime = 0;
if (group->tabBar->animationTime == 0) {
- if (group->tabBar->state == PaintFadeIn)
+ if (group->tabBar->state == PaintFadeIn) {
group->tabBar->state = PaintOn;
- else if (group->tabBar->state == PaintFadeOut)
+ changedTabBarState = TRUE;
+ } else if (group->tabBar->state == PaintFadeOut) {
group->tabBar->state = PaintOff;
+ changedTabBarState = TRUE;
+ }
}
}
@@ -659,6 +663,9 @@ void groupPreparePaintScreen(CompScreen * s, int msSinceLastPaint)
}
}
}
+
+ if (changedTabBarState)
+ groupCheckForVisibleTabBars(s->display);
groupHandleChanges(s);
groupDrawTabAnimation(s, msSinceLastPaint);
diff --git a/beryl-plugins/src/group/tab.c b/beryl-plugins/src/group/tab.c
index bbaaaed..87bd107 100644
--- a/beryl-plugins/src/group/tab.c
+++ b/beryl-plugins/src/group/tab.c
@@ -106,7 +106,7 @@ groupTabBarTimeout(void *data)
* groupCheckForVisibleTabBars
*
*/
-static void
+void
groupCheckForVisibleTabBars(CompDisplay *d)
{
GroupSelection *group;
@@ -391,7 +391,6 @@ groupHandleUntab(CompScreen *s, GroupSelection *group)
}
groupDeleteTabBar(group);
- groupDestroyInputPreventionWindow(group);
group->changeAnimationTime = 0;
group->changeState = PaintOff;
@@ -1790,13 +1789,15 @@ void groupDeleteTabBar(GroupSelection *group)
groupDestroyCairoLayer(group->windows[0]->screen, bar->textLayer);
groupDestroyCairoLayer(group->windows[0]->screen, bar->bgLayer);
groupDestroyCairoLayer(group->windows[0]->screen, bar->selectionLayer);
- groupSwitchTopTabInput(group, TRUE);
+
+ groupDestroyInputPreventionWindow(group);
while (bar->slots)
groupDeleteTabBarSlot(bar, bar->slots);
if (bar->region)
XDestroyRegion(bar->region);
+
free(bar);
group->tabBar = NULL;
}