/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
frame.c for the Openbox window manager
- Copyright (c) 2004 Mikael Magnusson
+ Copyright (c) 2006 Mikael Magnusson
Copyright (c) 2003 Ben Jansens
This program is free software; you can redistribute it and/or modify
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);
}
-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;
g_hash_table_remove(window_map, &self->tlresize);
g_hash_table_remove(window_map, &self->trresize);
- ob_main_loop_timeout_remove_data(ob_main_loop, flash_timeout, self);
+ ob_main_loop_timeout_remove_data(ob_main_loop, flash_timeout, self, TRUE);
frame_free(self);
}
break;
case 'D':
if (d) { *lc = ' '; break; }
- if (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) && config_theme_hidedisabled)
+ if (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS)
+ && config_theme_hidedisabled)
break;
d = TRUE;
self->label_width -= (ob_rr_theme->button_size +
break;
case 'S':
if (s) { *lc = ' '; break; }
- if (!(self->decorations & OB_FRAME_DECOR_SHADE) && config_theme_hidedisabled)
+ if (!(self->decorations & OB_FRAME_DECOR_SHADE)
+ && config_theme_hidedisabled)
break;
s = TRUE;
self->label_width -= (ob_rr_theme->button_size +
break;
case 'I':
if (i) { *lc = ' '; break; }
- if (!(self->decorations & OB_FRAME_DECOR_ICONIFY) && config_theme_hidedisabled)
+ if (!(self->decorations & OB_FRAME_DECOR_ICONIFY)
+ && config_theme_hidedisabled)
break;
i = TRUE;
self->label_width -= (ob_rr_theme->button_size +
break;
case 'M':
if (m) { *lc = ' '; break; }
- if (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) && config_theme_hidedisabled)
+ if (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE)
+ && config_theme_hidedisabled)
break;
m = TRUE;
self->label_width -= (ob_rr_theme->button_size +
break;
case 'C':
if (c) { *lc = ' '; break; }
- if (!(self->decorations & OB_FRAME_DECOR_CLOSE) && config_theme_hidedisabled)
+ if (!(self->decorations & OB_FRAME_DECOR_CLOSE)
+ && config_theme_hidedisabled)
break;
c = TRUE;
self->label_width -= (ob_rr_theme->button_size +
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;