summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErkin Bahceci <erkinbah@gmail.com>2009-08-15 23:39:33 -0500
committerErkin Bahceci <erkinbah@gmail.com>2009-08-15 23:55:06 -0500
commitc465ed46c113a1362177a32ca6db58d69a90f754 (patch)
treeb677354cc7c09a5c9d97cb736b5e6f77154eca3a
parentbe6f0c57bc708643b4c9207868c7414c3f687364 (diff)
downloadgroup-c465ed46c113a1362177a32ca6db58d69a90f754.tar.gz
group-c465ed46c113a1362177a32ca6db58d69a90f754.tar.bz2
Remove timers at termination.
-rw-r--r--group-internal.h5
-rw-r--r--init.c21
2 files changed, 22 insertions, 4 deletions
diff --git a/group-internal.h b/group-internal.h
index 5fcf24d..299ff27 100644
--- a/group-internal.h
+++ b/group-internal.h
@@ -283,11 +283,12 @@ typedef struct _GroupTabBar {
GroupAnimationType bgAnimation;
PaintState state;
- int timeoutHandle;
int animationTime;
Region region;
int oldWidth;
+ CompTimeoutHandle timeoutHandle;
+
/* For DnD animations */
int leftSpringX, rightSpringX;
int leftSpeed, rightSpeed;
@@ -451,6 +452,8 @@ typedef struct _GroupScreen {
Bool dragged;
int prevX, prevY; /* Buffer for mouse coordinates */
+ CompTimeoutHandle initialActionsTimeoutHandle;
+
CompTexture glowTexture;
} GroupScreen;
diff --git a/init.c b/init.c
index c9aa1c0..31417da 100644
--- a/init.c
+++ b/init.c
@@ -137,6 +137,10 @@ groupApplyInitialActions (void *closure)
CompScreen *s = (CompScreen *) closure;
CompWindow *w;
+ GROUP_SCREEN (s);
+
+ gs->initialActionsTimeoutHandle = 0;
+
/* we need to do it from top to buttom of the stack to avoid problems
with a reload of Compiz and tabbed static groups. (topTab will always
be above the other windows in the group) */
@@ -154,8 +158,6 @@ groupApplyInitialActions (void *closure)
{
GroupSelection *group;
- GROUP_SCREEN (s);
-
for (group = gs->groups; group; group = group->next)
if (group->identifier == id)
break;
@@ -354,7 +356,8 @@ groupInitScreen (CompPlugin *p,
/* one-shot timeout for stuff that needs to be initialized after
all screens and windows are initialized */
- compAddTimeout (0, 0, groupApplyInitialActions, (void *) s);
+ gs->initialActionsTimeoutHandle =
+ compAddTimeout (0, 0, groupApplyInitialActions, (void *) s);
initTexture (s, &gs->glowTexture);
@@ -409,6 +412,9 @@ groupFiniScreen (CompPlugin *p,
if (group->tabBar->region)
XDestroyRegion (group->tabBar->region);
+ if (group->tabBar->timeoutHandle)
+ compRemoveTimeout (group->tabBar->timeoutHandle);
+
free (group->tabBar);
}
@@ -424,6 +430,15 @@ groupFiniScreen (CompPlugin *p,
if (gs->grabIndex)
groupGrabScreen (s, ScreenGrabNone);
+ if (gs->dragHoverTimeoutHandle)
+ compRemoveTimeout (gs->dragHoverTimeoutHandle);
+
+ if (gs->showDelayTimeoutHandle)
+ compRemoveTimeout (gs->showDelayTimeoutHandle);
+
+ if (gs->initialActionsTimeoutHandle)
+ compRemoveTimeout (gs->initialActionsTimeoutHandle);
+
freeWindowPrivateIndex (s, gs->windowPrivateIndex);
UNWRAP (gs, s, windowMoveNotify);