summaryrefslogtreecommitdiff
path: root/openbox/frame.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@comhem.se>2006-08-17 16:16:37 +0000
committerMikael Magnusson <mikachu@comhem.se>2006-08-17 16:16:37 +0000
commita2f2fefeffc74e93504588f9545507814857723e (patch)
tree0d31dfc89e092260d3588af6632d424b04f26028 /openbox/frame.c
parent83a0303dd75ef0487fdd53e810914f21fdd3e459 (diff)
add a client destructor to frame.c so it doesn't try to keep flashing a free'd frame
Diffstat (limited to 'openbox/frame.c')
-rw-r--r--openbox/frame.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/openbox/frame.c b/openbox/frame.c
index c55ff290..2c495b27 100644
--- a/openbox/frame.c
+++ b/openbox/frame.c
@@ -43,6 +43,7 @@
static void layout_title(ObFrame *self);
static void flash_done(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 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()
{
XSetWindowAttributes attrib;
@@ -908,6 +921,11 @@ static gboolean flash_timeout(gpointer data)
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)
{
self->flash_on = self->focused;