g_hash_table_remove(window_map, &self->rgriptop);
g_hash_table_remove(window_map, &self->rgripbottom);
- obt_main_loop_timeout_remove_data(ob_main_loop, flash_timeout, self,
- TRUE);
+
}
ObFrameContext frame_context(gpointer _self, Window win, gint x, gint y)
OBDEFAULTFRAME(self)->focused = FALSE;
}
-void frame_flash_start(gpointer _self)
-{
- ObDefaultFrame * self = (ObDefaultFrame *) _self;
- self->flash_on = self->focused;
-
- if (!self->flashing)
- obt_main_loop_timeout_add(ob_main_loop, G_USEC_PER_SEC * 0.6,
- flash_timeout, self, g_direct_equal, flash_done);
- g_get_current_time(&self->flash_end);
- g_time_val_add(&self->flash_end, G_USEC_PER_SEC * 5);
-
- self->flashing = TRUE;
-}
-
-void frame_flash_stop(gpointer _self)
-{
- ObDefaultFrame * self = (ObDefaultFrame *) _self;
- self->flashing = FALSE;
-}
-
void frame_set_decorations(gpointer self, ObFrameDecorations d)
{
OBDEFAULTFRAME(self)->decorations = d;
return FALSE;
}
-void flash_done(gpointer data)
-{
- ObDefaultFrame *self = data;
-
- if (self->focused != self->flash_on)
- frame_adjust_focus(self, self->focused);
-}
-
-gboolean flash_timeout(gpointer data)
-{
- ObDefaultFrame *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 (!self->flashing)
- return FALSE; /* we are done */
-
- self->flash_on = !self->flash_on;
- if (!self->focused) {
- frame_adjust_focus(self, self->flash_on);
- self->focused = FALSE;
- }
-
- return TRUE; /* go again */
-}
-
void layout_title(ObDefaultFrame * self)
{
gchar *lc;
frame_set_is_max_vert, /* */
frame_set_is_max_horz, /* */
frame_set_is_shaded, /* */
- frame_flash_start, /* */
- frame_flash_stop, /* */
+ 0, //frame_flash_start, /* */
+ 0, //frame_flash_stop, /* */
frame_set_decorations, /* */
frame_update_title, /* */
/* This give the window area */
{
return &plugin;
}
+
+gboolean flash_timeout(gpointer data)
+{
+ return TRUE;
+}
+
gboolean focused;
gboolean need_render;
- gboolean flashing;
- gboolean flash_on;
- GTimeVal flash_end;
-
GTimeVal iconify_animation_end;
};
gboolean frame_is_max_horz(gpointer self);
gboolean frame_is_max_vert(gpointer self);
-void flash_done(gpointer data);
-gboolean flash_timeout(gpointer data);
-
void layout_title(ObDefaultFrame *);
void set_theme_statics(gpointer self);
void free_theme_statics(gpointer self);
obt_display, ob_screen), self->area.x,
self->area.y);
}
- frame_engine->frame_ungrab(self->frame, window_map);
+ frame_engine->frame_ungrab(self->frame, window_map);
+ obt_main_loop_timeout_remove_data(ob_main_loop, client_flash_timeout, self, TRUE);
frame_engine->frame_free(self->frame);
self->frame = NULL;
self->demands_attention = hilite && !client_focused(self);
if (self->frame != NULL) { /* if we're mapping, just set the state */
if (self->demands_attention)
- frame_engine->frame_flash_start(self->frame);
+ client_flash_start(self);
else
- frame_engine->frame_flash_stop(self->frame);
+ client_flash_stop(self);
client_change_state(self);
}
}
XUnmapWindow(obt_display, self->w_client);
self->ignore_unmaps++;
}
+
+gboolean client_flash_timeout(gpointer data)
+{
+ ObClient * self = (ObClient *) 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 (!self->flashing)
+ return FALSE; /* we are done */
+
+ self->flash_on = !self->flash_on;
+ if (!self->focused) {
+ frame_engine->frame_set_is_focus(self->frame, self->flash_on);
+ frame_engine->frame_update_skin (self->frame);
+ self->focused = FALSE;
+ }
+ return TRUE; /* go again */
+}
+
+void client_flash_start(ObClient * self)
+{
+ self->flash_on = self->focused;
+ if (!self->flashing)
+ obt_main_loop_timeout_add(ob_main_loop, G_USEC_PER_SEC * 0.6,
+ client_flash_timeout, self, g_direct_equal, client_flash_done);
+ g_get_current_time(&self->flash_end);
+ g_time_val_add(&self->flash_end, G_USEC_PER_SEC * 5);
+
+ self->flashing = TRUE;
+}
+
+void client_flash_stop(ObClient * self)
+{
+ self->flashing = FALSE;
+}
+
+void client_flash_done(gpointer data)
+{
+ ObClient * self = (ObClient *) data;
+ if (self->focused != self->flash_on)
+ {
+ frame_engine->frame_set_is_focus(self->frame, self->focused);
+ frame_engine->frame_update_skin (self->frame);
+ }
+}
/*! A boolean used for algorithms which need to mark clients as visited */
gboolean visited;
+
+ /* Manage flashing */
+ gboolean focused;
+ gboolean flashing;
+ gboolean flash_on;
+ GTimeVal flash_end;
};
extern GList *client_list;
void client_show_frame(ObClient *);
void client_hide_frame(ObClient *);
+
+gboolean client_flash_timeout(gpointer);
+void client_flash_start(ObClient *);
+void client_flash_stop(ObClient *);
+void client_flash_done(gpointer);
#endif