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.
dock->hidden = TRUE;
dock_configure();
dock->hidden = TRUE;
dock_configure();
return FALSE; /* don't repeat */
}
return FALSE; /* don't repeat */
}
dock->hidden = FALSE;
dock_configure();
dock->hidden = FALSE;
dock_configure();
return FALSE; /* don't repeat */
}
return FALSE; /* don't repeat */
}
+static void destroy_timeout(gpointer data)
+{
+ gint *id = data;
+ *id = 0;
+}
+
void dock_hide(gboolean hide)
{
if (!hide) {
if (dock->hidden && config_dock_hide) {
show_timeout_id = g_timeout_add_full(G_PRIORITY_DEFAULT,
config_dock_show_delay,
void dock_hide(gboolean hide)
{
if (!hide) {
if (dock->hidden && config_dock_hide) {
show_timeout_id = g_timeout_add_full(G_PRIORITY_DEFAULT,
config_dock_show_delay,
- show_timeout, NULL, NULL);
+ show_timeout, &show_timeout_id, destroy_timeout);
} else if (!dock->hidden && config_dock_hide && hide_timeout_id) {
if (hide_timeout_id) g_source_remove(hide_timeout_id);
} else if (!dock->hidden && config_dock_hide && hide_timeout_id) {
if (hide_timeout_id) g_source_remove(hide_timeout_id);
}
} else {
if (!dock->hidden && config_dock_hide) {
hide_timeout_id = g_timeout_add_full(G_PRIORITY_DEFAULT,
config_dock_hide_delay,
}
} else {
if (!dock->hidden && config_dock_hide) {
hide_timeout_id = g_timeout_add_full(G_PRIORITY_DEFAULT,
config_dock_hide_delay,
- hide_timeout, NULL, NULL);
+ hide_timeout, &hide_timeout_id, destroy_timeout);
} else if (dock->hidden && config_dock_hide && show_timeout_id) {
if (show_timeout_id) g_source_remove(show_timeout_id);
} else if (dock->hidden && config_dock_hide && show_timeout_id) {
if (show_timeout_id) g_source_remove(show_timeout_id);
if (client_focus(d->client) && config_focus_raise)
stacking_raise(CLIENT_AS_WINDOW(d->client));
event_curtime = old;
if (client_focus(d->client) && config_focus_raise)
stacking_raise(CLIENT_AS_WINDOW(d->client));
event_curtime = old;
return FALSE; /* no repeat */
}
return FALSE; /* no repeat */
}
event_curserial = d->serial;
focus_nothing();
event_curtime = old;
event_curserial = d->serial;
focus_nothing();
event_curtime = old;
return FALSE; /* no repeat */
}
return FALSE; /* no repeat */
}
if (self->focused != self->flash_on)
frame_adjust_focus(self, self->focused);
if (self->focused != self->flash_on)
frame_adjust_focus(self, self->focused);
+
+ self->flash_timer = 0;
}
static gboolean flash_timeout(gpointer data)
}
static gboolean flash_timeout(gpointer data)
XMoveResizeWindow(obt_display, self->window, x, y, w, h);
XFlush(obt_display);
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 */
}
return time > 0; /* repeat until we're out of time */
}
-void frame_end_iconify_animation(ObFrame *self)
+void frame_end_iconify_animation(gpointer data)
/* see if there is an animation going */
if (self->iconify_animation_going == 0) return;
/* see if there is an animation going */
if (self->iconify_animation_going == 0) return;
/* we're not animating any more ! */
self->iconify_animation_going = 0;
/* 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,
XMoveResizeWindow(obt_display, self->window,
self->area.x, self->area.y,
self->iconify_animation_timer =
g_timeout_add_full(G_PRIORITY_DEFAULT,
FRAME_ANIMATE_ICONIFY_STEP_TIME,
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);
will be called when the animation finishes. But if another animation is
started in the meantime, the callback will never get called. */
void frame_begin_iconify_animation(ObFrame *self, gboolean iconifying);
will be called when the animation finishes. But if another animation is
started in the meantime, the callback will never get called. */
void frame_begin_iconify_animation(ObFrame *self, gboolean iconifying);
-void frame_end_iconify_animation(ObFrame *self);
+void frame_end_iconify_animation(gpointer data);
#define frame_iconify_animating(f) (f->iconify_animation_going != 0)
#define frame_iconify_animating(f) (f->iconify_animation_going != 0)
static void remove_submenu_hide_timeout(ObMenuFrame *child)
{
if (submenu_hide_timer) g_source_remove(submenu_hide_timer);
static void remove_submenu_hide_timeout(ObMenuFrame *child)
{
if (submenu_hide_timer) g_source_remove(submenu_hide_timer);
- submenu_hide_timer = 0;
}
gboolean menu_frame_show_submenu(ObMenuFrame *self, ObMenuFrame *parent,
}
gboolean menu_frame_show_submenu(ObMenuFrame *self, ObMenuFrame *parent,
- if (config_submenu_show_delay) {
+ if (config_submenu_show_delay && submenu_show_timer)
/* remove any submenu open requests */
/* remove any submenu open requests */
- if (submenu_show_timer) g_source_remove(submenu_show_timer);
- submenu_show_timer = 0;
- }
+ g_source_remove(submenu_show_timer);
if ((it = g_list_last(menu_frame_visible)))
menu_frame_hide(it->data);
}
if ((it = g_list_last(menu_frame_visible)))
menu_frame_hide(it->data);
}
+static void submenu_show_dest(gpointer data)
+{
+ submenu_show_timer = 0;
+}
+
static gboolean submenu_hide_timeout(gpointer data)
{
g_assert(menu_frame_visible);
static gboolean submenu_hide_timeout(gpointer data)
{
g_assert(menu_frame_visible);
+static void submenu_hide_dest(gpointer data)
+{
+ submenu_hide_timer = 0;
+}
+
void menu_frame_select(ObMenuFrame *self, ObMenuEntryFrame *entry,
gboolean immediate)
{
void menu_frame_select(ObMenuFrame *self, ObMenuEntryFrame *entry,
gboolean immediate)
{
if (!entry && oldchild_entry)
entry = oldchild_entry;
if (!entry && oldchild_entry)
entry = oldchild_entry;
- if (config_submenu_show_delay) {
+ if (config_submenu_show_delay && submenu_show_timer)
/* remove any submenu open requests */
/* remove any submenu open requests */
- if (submenu_show_timer) g_source_remove(submenu_show_timer);
- submenu_show_timer = 0;
- }
+ g_source_remove(submenu_show_timer);
submenu_hide_timer =
g_timeout_add_full(G_PRIORITY_DEFAULT,
config_submenu_hide_delay,
submenu_hide_timer =
g_timeout_add_full(G_PRIORITY_DEFAULT,
config_submenu_hide_delay,
- submenu_hide_timeout, oldchild, NULL);
+ submenu_hide_timeout, oldchild, submenu_hide_dest);
g_timeout_add_full(G_PRIORITY_DEFAULT,
config_submenu_show_delay,
submenu_show_timeout,
g_timeout_add_full(G_PRIORITY_DEFAULT,
config_submenu_show_delay,
submenu_show_timeout,
+ self->selected, submenu_show_dest);
}
}
/* hide the grandchildren of this menu. and move the cursor to
}
}
/* hide the grandchildren of this menu. and move the cursor to