-->
<keepBorder>yes</keepBorder>
<animateIconify>yes</animateIconify>
+ <flashFrameDelay>600</flashFrameDelay>
+ <flashFrameDuration>5000</flashFrameDuration>
<font place="ActiveWindow">
<name>sans</name>
<size>8</size>
<xsd:element minOccurs="0" name="titleLayout" type="xsd:string"/>
<xsd:element minOccurs="0" name="keepBorder" type="ob:bool"/>
<xsd:element minOccurs="0" name="animateIconify" type="ob:bool"/>
+ <xsd:element minOccurs="0" name="flashFrameDelay" type="ob:integer"/>
+ <xsd:element minOccurs="0" name="flashFrameDuration" type="ob:integer"/>
+ <xsd:element minOccurs="0" name="animateIconify" type="ob:bool"/>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="font" type="ob:font"/>
</xsd:sequence>
</xsd:complexType>
gchar *config_theme;
gboolean config_theme_keepborder;
guint config_theme_window_list_icon_size;
+guint config_frame_flash_delay;
+guint config_frame_flash_duration;
gchar *config_title_layout;
else if (config_theme_window_list_icon_size > 96)
config_theme_window_list_icon_size = 96;
}
+ if ((n = obt_xml_find_node(node, "flashFrameDelay")))
+ config_frame_flash_delay = obt_xml_node_int(n);
+ if ((n = obt_xml_find_node(node, "flashFrameDuration")))
+ config_frame_flash_duration = obt_xml_node_int(n);
n = obt_xml_find_node(node, "font");
while (n) {
config_title_layout = g_strdup("NLIMC");
config_theme_keepborder = TRUE;
config_theme_window_list_icon_size = 36;
+ config_frame_flash_delay = 600;
+ config_frame_flash_duration = 5000;
config_font_activewindow = NULL;
config_font_inactivewindow = NULL;
extern gboolean config_animate_iconify;
/*! Size of icons in focus switching dialogs */
extern guint config_theme_window_list_icon_size;
+/*! Amount of time between flashes (0 to disable flashing) */
+extern guint config_frame_flash_delay;
+/*! How long (ms) to flash the window's frame (0 to flash forever) */
+extern guint config_frame_flash_duration;
/*! The font for the active window's title */
extern RrFont *config_font_activewindow;
ObFrame *self = data;
GTimeVal now;
- g_get_current_time(&now);
- if (now.tv_sec > self->flash_end.tv_sec ||
- (now.tv_sec == self->flash_end.tv_sec &&
- now.tv_usec >= self->flash_end.tv_usec))
- self->flashing = FALSE;
+ if (config_frame_flash_duration != 0) {
+ g_get_current_time(&now);
+ if (now.tv_sec > self->flash_end.tv_sec ||
+ (now.tv_sec == self->flash_end.tv_sec &&
+ now.tv_usec >= self->flash_end.tv_usec))
+ self->flashing = FALSE;
+ }
if (!self->flashing)
return FALSE; /* we are done */
void frame_flash_start(ObFrame *self)
{
+ if (config_frame_flash_delay == 0) return;
+
self->flash_on = self->focused;
if (!self->flashing)
self->flash_timer = g_timeout_add_full(G_PRIORITY_DEFAULT,
- 600, flash_timeout, self,
+ config_frame_flash_delay, flash_timeout, self,
flash_done);
- g_get_current_time(&self->flash_end);
- g_time_val_add(&self->flash_end, G_USEC_PER_SEC * 5);
+
+ if (config_frame_flash_duration != 0) {
+ g_get_current_time(&self->flash_end);
+ g_time_val_add(&self->flash_end, 1000 * config_frame_flash_duration);
+ }
self->flashing = TRUE;
}