added taskbar_active_background_id to change current desktop background
git-svn-id: http://tint2.googlecode.com/svn/trunk@166 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
c8d09ed731
commit
69ad0897d1
4 changed files with 44 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
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"
|
||||
|
|
|
@ -85,6 +85,7 @@ void init_config()
|
|||
|
||||
panel_config = calloc(1, sizeof(Panel));
|
||||
systray.sort = 1;
|
||||
|
||||
// window manager's menu default value == false
|
||||
wm_menu = 0;
|
||||
max_tick_urgent = 7;
|
||||
|
@ -476,6 +477,13 @@ void add_entry (char *key, char *value)
|
|||
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)
|
||||
|
|
|
@ -103,6 +103,8 @@ void init_taskbar()
|
|||
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);
|
||||
|
|
29
src/tint.c
29
src/tint.c
|
@ -388,6 +388,35 @@ void event_property_notify (XEvent *e)
|
|||
// 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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue