summaryrefslogtreecommitdiff
path: root/openbox/frame.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2014-11-03 11:58:06 +0100
committerMikael Magnusson <mikachu@gmail.com>2014-11-03 12:10:44 +0100
commit031e3c13b4333ae8def24f4ccb2f777779d4a3a5 (patch)
treed4e751787e6d8e9b8c763673bc9ba2038ac6698e /openbox/frame.c
parent69dc27ed779173d0475f11001ea5268087b4b306 (diff)
Make sure to reset all the GSource timer ids
Avoids warnings like 'Source ID 8382 was not found when attempting to remove it'. In particular some removals were missing in menuframe.c resulting in a warning being printed every time a submenu was opened.
Diffstat (limited to 'openbox/frame.c')
-rw-r--r--openbox/frame.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/openbox/frame.c b/openbox/frame.c
index 3dbcf126..68332dff 100644
--- a/openbox/frame.c
+++ b/openbox/frame.c
@@ -1666,6 +1666,8 @@ static void flash_done(gpointer data)
if (self->focused != self->flash_on)
frame_adjust_focus(self, self->focused);
+
+ self->flash_timer = 0;
}
static gboolean flash_timeout(gpointer data)
@@ -1787,14 +1789,12 @@ static gboolean frame_animate_iconify(gpointer p)
XMoveResizeWindow(obt_display, self->window, x, y, w, h);
XFlush(obt_display);
- if (time == 0)
- frame_end_iconify_animation(self);
-
return time > 0; /* repeat until we're out of time */
}
-void frame_end_iconify_animation(ObFrame *self)
+void frame_end_iconify_animation(gpointer data)
{
+ ObFrame *self = data;
/* see if there is an animation going */
if (self->iconify_animation_going == 0) return;
@@ -1811,6 +1811,7 @@ void frame_end_iconify_animation(ObFrame *self)
/* we're not animating any more ! */
self->iconify_animation_going = 0;
+ self->iconify_animation_timer = 0;
XMoveResizeWindow(obt_display, self->window,
self->area.x, self->area.y,
@@ -1861,7 +1862,8 @@ void frame_begin_iconify_animation(ObFrame *self, gboolean iconifying)
self->iconify_animation_timer =
g_timeout_add_full(G_PRIORITY_DEFAULT,
FRAME_ANIMATE_ICONIFY_STEP_TIME,
- frame_animate_iconify, self, NULL);
+ frame_animate_iconify, self,
+ frame_end_iconify_animation);
/* do the first step */