add a client destructor to frame.c so it doesn't try to keep flashing a free'd frame
This commit is contained in:
parent
83a0303dd7
commit
a2f2fefeff
4 changed files with 23 additions and 0 deletions
|
@ -175,6 +175,7 @@ void event_shutdown(gboolean reconfig)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
client_remove_destructor(focus_delay_client_dest);
|
client_remove_destructor(focus_delay_client_dest);
|
||||||
|
client_remove_destructor(event_client_dest);
|
||||||
XFreeModifiermap(modmap);
|
XFreeModifiermap(modmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
static void layout_title(ObFrame *self);
|
static void layout_title(ObFrame *self);
|
||||||
static void flash_done(gpointer data);
|
static void flash_done(gpointer data);
|
||||||
static gboolean flash_timeout(gpointer data);
|
static gboolean flash_timeout(gpointer data);
|
||||||
|
static void flash_client_dest(ObClient *client, gpointer data);
|
||||||
|
|
||||||
static void set_theme_statics(ObFrame *self);
|
static void set_theme_statics(ObFrame *self);
|
||||||
static void free_theme_statics(ObFrame *self);
|
static void free_theme_statics(ObFrame *self);
|
||||||
|
@ -56,6 +57,18 @@ static Window createWindow(Window parent, gulong mask,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void frame_startup(gboolean reconfig)
|
||||||
|
{
|
||||||
|
if (reconfig) return;
|
||||||
|
client_add_destructor(flash_client_dest, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void frame_shutdown(gboolean reconfig)
|
||||||
|
{
|
||||||
|
if (reconfig) return;
|
||||||
|
client_remove_destructor(flash_client_dest);
|
||||||
|
}
|
||||||
|
|
||||||
ObFrame *frame_new()
|
ObFrame *frame_new()
|
||||||
{
|
{
|
||||||
XSetWindowAttributes attrib;
|
XSetWindowAttributes attrib;
|
||||||
|
@ -908,6 +921,11 @@ static gboolean flash_timeout(gpointer data)
|
||||||
return TRUE; /* go again */
|
return TRUE; /* go again */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void flash_client_dest(ObClient *client, gpointer data)
|
||||||
|
{
|
||||||
|
ob_main_loop_timeout_remove_data(ob_main_loop, flash_timeout, client);
|
||||||
|
}
|
||||||
|
|
||||||
void frame_flash_start(ObFrame *self)
|
void frame_flash_start(ObFrame *self)
|
||||||
{
|
{
|
||||||
self->flash_on = self->focused;
|
self->flash_on = self->focused;
|
||||||
|
|
|
@ -141,6 +141,8 @@ struct _ObFrame
|
||||||
GTimeVal flash_end;
|
GTimeVal flash_end;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void frame_startup(gboolean reconfig);
|
||||||
|
void frame_shutdown(gboolean reconfig);
|
||||||
ObFrame *frame_new();
|
ObFrame *frame_new();
|
||||||
void frame_show(ObFrame *self);
|
void frame_show(ObFrame *self);
|
||||||
void frame_hide(ObFrame *self);
|
void frame_hide(ObFrame *self);
|
||||||
|
|
|
@ -248,6 +248,7 @@ gint main(gint argc, gchar **argv)
|
||||||
grab_startup(reconfigure);
|
grab_startup(reconfigure);
|
||||||
group_startup(reconfigure);
|
group_startup(reconfigure);
|
||||||
client_startup(reconfigure);
|
client_startup(reconfigure);
|
||||||
|
frame_startup(reconfigure);
|
||||||
dock_startup(reconfigure);
|
dock_startup(reconfigure);
|
||||||
moveresize_startup(reconfigure);
|
moveresize_startup(reconfigure);
|
||||||
keyboard_startup(reconfigure);
|
keyboard_startup(reconfigure);
|
||||||
|
@ -284,6 +285,7 @@ gint main(gint argc, gchar **argv)
|
||||||
keyboard_shutdown(reconfigure);
|
keyboard_shutdown(reconfigure);
|
||||||
moveresize_shutdown(reconfigure);
|
moveresize_shutdown(reconfigure);
|
||||||
dock_shutdown(reconfigure);
|
dock_shutdown(reconfigure);
|
||||||
|
frame_shutdown(reconfigure);
|
||||||
client_shutdown(reconfigure);
|
client_shutdown(reconfigure);
|
||||||
group_shutdown(reconfigure);
|
group_shutdown(reconfigure);
|
||||||
grab_shutdown(reconfigure);
|
grab_shutdown(reconfigure);
|
||||||
|
|
Loading…
Reference in a new issue