all repos — tint2 @ 3f9adec3e366e005bff1483cb9dd988581f1c1cb

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

*fix* allow minimizing omnipresent windows also on desktop 2-n
*fix* hopefully fixed issue 145
*fix* removed two unused variables



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

3f9adec3e366e005bff1483cb9dd988581f1c1cb

parent

1ad9ff84f96f1cee90d5616b57d97c1e4e0a35f9

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

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

@@ -150,7 +150,6 @@ void init_battery_panel(void *p)

{ Panel *panel = (Panel*)p; Battery *battery = &panel->battery; - FILE *fp; int bat_percentage_height, bat_percentage_height_ink, bat_time_height, bat_time_height_ink; if (!battery_enabled)

@@ -194,7 +193,7 @@ void update_battery() {

FILE *fp; char tmp[25]; int64_t energy_now = 0, energy_full = 0, current_now = 0; - int i, seconds = 0; + int seconds = 0; int8_t new_percentage = 0; fp = fopen(path_status, "r");
M src/taskbar/task.hsrc/taskbar/task.h

@@ -54,6 +54,12 @@ char *title;

} Task; +typedef struct { + Task* tsk; + int tick; +} Task_urgent; + + Task *add_task (Window win); void remove_task (Task *tsk);
M src/tint.csrc/tint.c

@@ -265,8 +265,10 @@ case ICONIFY:

XIconifyWindow (server.dsp, tsk->win, server.screen); break; case TOGGLE_ICONIFY: - if (tsk == task_active) XIconifyWindow (server.dsp, tsk->win, server.screen); - else set_active (tsk->win); + if (task_active && tsk->win == task_active->win) + XIconifyWindow (server.dsp, tsk->win, server.screen); + else + set_active (tsk->win); break; case SHADE: window_toggle_shade (tsk->win);

@@ -478,10 +480,15 @@ }

else { tsk = task_get_task (win); if (!tsk) { - if ( at != server.atom._NET_WM_STATE) + // some stupid wm send _NET_WM_STATE after the window was minimized to tray??? + if (at != server.atom._NET_WM_STATE) return; - else if ( !(tsk = add_task(win)) ) - return; + else if (!window_is_skip_taskbar(win)) { + if (tsk = add_task(win)) + panel_refresh = 1; + else + return; + } } //printf("atom root_win = %s, %s\n", XGetAtomName(server.dsp, at), tsk->title);