all repos — tint2 @ 69ad0897d1c39b4e563e15b6ff4d55e647b2fca8

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

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
lorthiois@bbsoft.fr lorthiois@bbsoft.fr@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

69ad0897d1c39b4e563e15b6ff4d55e647b2fca8

parent

c8d09ed731c5fd7ff101032f61700d75c5ee3ba8

4 files changed, 44 insertions(+), 0 deletions(-)

jump to
M ChangeLogChangeLog

@@ -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"
M src/config.csrc/config.c

@@ -85,6 +85,7 @@ list_back = g_slist_append(0, calloc(1, sizeof(Area)));

panel_config = calloc(1, sizeof(Panel)); systray.sort = 1; + // window manager's menu default value == false wm_menu = 0; max_tick_urgent = 7;

@@ -475,6 +476,13 @@ int id = atoi (value);

Area *a = g_slist_nth_data(list_back, id); 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 */
M src/taskbar/taskbar.csrc/taskbar/taskbar.c

@@ -103,6 +103,8 @@ for (j=0 ; j < panel->nb_desktop ; j++) {

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);
M src/tint.csrc/tint.c

@@ -388,6 +388,35 @@ }

// 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(); }