all repos — tint2 @ 8b71e3614c8e7d35787d344880e8558114963e70

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

panel_items : allow panel without taskbar

git-svn-id: http://tint2.googlecode.com/svn/trunk@551 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
thilor77 thilor77@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

8b71e3614c8e7d35787d344880e8558114963e70

parent

b98d2001cb77c7a3c69117616fccff36a200a9ef

3 files changed, 7 insertions(+), 2 deletions(-)

jump to
M src/config.csrc/config.c

@@ -242,7 +242,8 @@ int j;

for (j=0 ; j < strlen(panel_items_order) ; j++) { if (panel_items_order[j] == 'L') launcher_enabled = 1; - //if (panel_items_order[j] == 'T') + if (panel_items_order[j] == 'T') + taskbar_enabled = 1; if (panel_items_order[j] == 'B') { #ifdef ENABLE_BATTERY battery_enabled = 1;
M src/taskbar/taskbar.csrc/taskbar/taskbar.c

@@ -41,6 +41,7 @@ GHashTable* win_to_task_table;

Task *task_active; Task *task_drag; +int taskbar_enabled; guint win_hash(gconstpointer key) { return (guint)*((Window*)key); } gboolean win_compare(gconstpointer a, gconstpointer b) { return (*((Window*)a) == *((Window*)b)); }

@@ -52,6 +53,7 @@ {

win_to_task_table = 0; urgent_timeout = 0; urgent_list = 0; + taskbar_enabled = 0; } void cleanup_taskbar()

@@ -220,7 +222,7 @@

GPtrArray* task_get_tasks(Window win) { - if (win_to_task_table) + if (win_to_task_table && taskbar_enabled) return g_hash_table_lookup(win_to_task_table, &win); else return 0;

@@ -232,6 +234,7 @@ {

Window *win; int num_results, i; + if (!taskbar_enabled) return; win = server_get_property (server.root_win, server.atom._NET_CLIENT_LIST, XA_WINDOW, &num_results); if (!win) return;
M src/taskbar/taskbar.hsrc/taskbar/taskbar.h

@@ -13,6 +13,7 @@

extern GHashTable* win_to_task_table; extern Task *task_active; extern Task *task_drag; +extern int taskbar_enabled; // tint2 use one taskbar per desktop. typedef struct {