{
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)
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");
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);
else {
tsk = task_get_task (win);
if (!tsk) {
- if ( at != server.atom._NET_WM_STATE)
- return;
- else if ( !(tsk = add_task(win)) )
+ // some stupid wm send _NET_WM_STATE after the window was minimized to tray???
+ if (at != server.atom._NET_WM_STATE)
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);