*change* make tooltip more generous, and preparation for setting a tooltip on the clock

git-svn-id: http://tint2.googlecode.com/svn/trunk@271 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
Andreas.Fink85
2009-11-16 17:17:53 +00:00
parent d1e7d189bf
commit 7fa58c0552
8 changed files with 160 additions and 116 deletions

View File

@@ -36,6 +36,13 @@
static int urgent_timer = 0;
const char* task_get_tooltip(void* obj)
{
Task* t = obj;
return t->title;
}
Task *add_task (Window win)
{
if (!win) return 0;
@@ -82,6 +89,7 @@ Task *add_task (Window win)
new_tsk2->area.on_screen = 0;
}
new_tsk2->title = new_tsk.title;
new_tsk2->area._get_tooltip_text = task_get_tooltip;
new_tsk2->icon = new_tsk.icon;
new_tsk2->icon_active = new_tsk.icon_active;
new_tsk2->icon_width = new_tsk.icon_width;
@@ -102,12 +110,6 @@ void remove_task (Task *tsk)
Window win = tsk->win;
int desktop = tsk->desktop;
if (g_tooltip.task == tsk) {
tooltip_hide();
alarm(0);
g_tooltip.task = 0;
}
// free title and icon just for the first task
// even with task_on_all_desktop and with task_on_all_panel
//printf("remove_task %s %d\n", tsk->title, tsk->desktop);
@@ -159,12 +161,6 @@ void get_title(Task *tsk)
if (!panel->g_task.text && !g_tooltip.enabled) return;
if (g_tooltip.task == tsk) {
tooltip_hide();
alarm(0);
g_tooltip.task = 0;
}
name = server_get_property (tsk->win, server.atom._NET_WM_VISIBLE_NAME, server.atom.UTF8_STRING, 0);
if (!name || !strlen(name)) {
name = server_get_property (tsk->win, server.atom._NET_WM_NAME, server.atom.UTF8_STRING, 0);