summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErkin Bahceci <erkinbah@gmail.com>2009-08-15 23:50:09 -0500
committerErkin Bahceci <erkinbah@gmail.com>2009-08-15 23:55:38 -0500
commit663551cb50703f8993b5275fe9c5bbd9bce07711 (patch)
treec94c0456c650912616204763c563bf8b80a7ab0c
parentc465ed46c113a1362177a32ca6db58d69a90f754 (diff)
downloadgroup-663551cb50703f8993b5275fe9c5bbd9bce07711.tar.gz
group-663551cb50703f8993b5275fe9c5bbd9bce07711.tar.bz2
Convert Bool to timeout handle, remove it at termination.
-rw-r--r--group-internal.h2
-rw-r--r--init.c6
-rw-r--r--queues.c20
3 files changed, 16 insertions, 12 deletions
diff --git a/group-internal.h b/group-internal.h
index 299ff27..4ea0bb4 100644
--- a/group-internal.h
+++ b/group-internal.h
@@ -427,7 +427,7 @@ typedef struct _GroupScreen {
GroupPendingMoves *pendingMoves;
GroupPendingGrabs *pendingGrabs;
GroupPendingUngrabs *pendingUngrabs;
- Bool dequeueTimerSet;
+ CompTimeoutHandle dequeueTimeoutHandle;
GroupSelection *groups;
GroupSelection tmpSel;
diff --git a/init.c b/init.c
index 31417da..6856b41 100644
--- a/init.c
+++ b/init.c
@@ -343,7 +343,8 @@ groupInitScreen (CompPlugin *p,
gs->pendingMoves = NULL;
gs->pendingGrabs = NULL;
gs->pendingUngrabs = NULL;
- gs->dequeueTimerSet = FALSE;
+
+ gs->dequeueTimeoutHandle = 0;
gs->draggedSlot = NULL;
gs->dragged = FALSE;
@@ -436,6 +437,9 @@ groupFiniScreen (CompPlugin *p,
if (gs->showDelayTimeoutHandle)
compRemoveTimeout (gs->showDelayTimeoutHandle);
+ if (gs->dequeueTimeoutHandle)
+ compRemoveTimeout (gs->dequeueTimeoutHandle);
+
if (gs->initialActionsTimeoutHandle)
compRemoveTimeout (gs->initialActionsTimeoutHandle);
diff --git a/queues.c b/queues.c
index 4bfc2f7..5173671 100644
--- a/queues.c
+++ b/queues.c
@@ -65,10 +65,10 @@ groupEnqueueMoveNotify (CompWindow *w,
else
gs->pendingMoves = move;
- if (!gs->dequeueTimerSet)
+ if (!gs->dequeueTimeoutHandle)
{
- compAddTimeout (0, 0, groupDequeueTimer, (void *) w->screen);
- gs->dequeueTimerSet = TRUE;
+ gs->dequeueTimeoutHandle =
+ compAddTimeout (0, 0, groupDequeueTimer, (void *) w->screen);
}
}
@@ -165,10 +165,10 @@ groupEnqueueGrabNotify (CompWindow *w,
else
gs->pendingGrabs = grab;
- if (!gs->dequeueTimerSet)
+ if (!gs->dequeueTimeoutHandle)
{
- compAddTimeout (0, 0, groupDequeueTimer, (void *) w->screen);
- gs->dequeueTimerSet = TRUE;
+ gs->dequeueTimeoutHandle =
+ compAddTimeout (0, 0, groupDequeueTimer, (void *) w->screen);
}
}
@@ -221,10 +221,10 @@ groupEnqueueUngrabNotify (CompWindow *w)
else
gs->pendingUngrabs = ungrab;
- if (!gs->dequeueTimerSet)
+ if (!gs->dequeueTimeoutHandle)
{
- compAddTimeout (0, 0, groupDequeueTimer, (void *) w->screen);
- gs->dequeueTimerSet = TRUE;
+ gs->dequeueTimeoutHandle =
+ compAddTimeout (0, 0, groupDequeueTimer, (void *) w->screen);
}
}
@@ -261,7 +261,7 @@ groupDequeueTimer (void *closure)
groupDequeueGrabNotifies (s);
groupDequeueUngrabNotifies (s);
- gs->dequeueTimerSet = FALSE;
+ gs->dequeueTimeoutHandle = 0;
return FALSE;
}