+2009-08-30
+- added taskbar_active_background_id to change current desktop background.
+ warning : this feature have a price on cpu (tint2 redraw all task) when you switch desktop.
+ comment out taskbar_active_background_id if you don't want it.
+
2009-08-30
- fixed issue 130 by maato
ordered systray icon with config "systray_sort = asc/desc"
panel_config = calloc(1, sizeof(Panel));
systray.sort = 1;
+
// window manager's menu default value == false
wm_menu = 0;
max_tick_urgent = 7;
memcpy(&panel_config->g_taskbar.pix.back, &a->pix.back, sizeof(Color));
memcpy(&panel_config->g_taskbar.pix.border, &a->pix.border, sizeof(Border));
}
+ else if (strcmp (key, "taskbar_active_background_id") == 0) {
+ int id = atoi (value);
+ Area *a = g_slist_nth_data(list_back, id);
+ memcpy(&panel_config->g_taskbar.pix_active.back, &a->pix.back, sizeof(Color));
+ memcpy(&panel_config->g_taskbar.pix_active.border, &a->pix.border, sizeof(Border));
+ panel_config->g_taskbar.use_active = 1;
+ }
/* Task */
else if (strcmp (key, "task_text") == 0)
tskbar = &panel->taskbar[j];
memcpy(&tskbar->area, &panel->g_taskbar, sizeof(Area));
tskbar->desktop = j;
+ if (j == server.desktop && tskbar->area.use_active)
+ tskbar->area.is_active = 1;
// add taskbar to the panel
panel->area.list = g_slist_append(panel->area.list, tskbar);
// Change desktop
else if (at == server.atom._NET_CURRENT_DESKTOP) {
server.desktop = server_get_current_desktop ();
+ for (i=0 ; i < nb_panel ; i++) {
+ Panel *panel = &panel1[i];
+ if (panel_mode == MULTI_DESKTOP && panel->g_taskbar.use_active) {
+ // redraw taskbar
+ panel_refresh = 1;
+ Taskbar *tskbar;
+ Task *tsk;
+ GSList *l;
+ for (j=0 ; j < panel->nb_desktop ; j++) {
+ tskbar = &panel->taskbar[j];
+ if (tskbar->area.is_active) {
+ tskbar->area.is_active = 0;
+ tskbar->area.redraw = 1;
+ for (l = tskbar->area.list; l ; l = l->next) {
+ tsk = l->data;
+ tsk->area.redraw = 1;
+ }
+ }
+ if (j == server.desktop) {
+ tskbar->area.is_active = 1;
+ tskbar->area.redraw = 1;
+ for (l = tskbar->area.list; l ; l = l->next) {
+ tsk = l->data;
+ tsk->area.redraw = 1;
+ }
+ }
+ }
+ }
+ }
if (panel_mode != MULTI_DESKTOP) {
visible_object();
}