panel_items : allow panel without taskbar
git-svn-id: http://tint2.googlecode.com/svn/trunk@551 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
b98d2001cb
commit
8b71e3614c
3 changed files with 7 additions and 2 deletions
|
@ -242,7 +242,8 @@ void add_entry (char *key, char *value)
|
|||
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;
|
||||
|
|
|
@ -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 @@ void default_taskbar()
|
|||
win_to_task_table = 0;
|
||||
urgent_timeout = 0;
|
||||
urgent_list = 0;
|
||||
taskbar_enabled = 0;
|
||||
}
|
||||
|
||||
void cleanup_taskbar()
|
||||
|
@ -220,7 +222,7 @@ Task *task_get_task (Window win)
|
|||
|
||||
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 @@ void task_refresh_tasklist ()
|
|||
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;
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue