all repos — tint2 @ 466f4fb1db62e890f24eca67ea5681bb84c861ac

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

fixed possible segfault

git-svn-id: http://tint2.googlecode.com/svn/trunk@76 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
lorthiois@bbsoft.fr lorthiois@bbsoft.fr@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

466f4fb1db62e890f24eca67ea5681bb84c861ac

parent

88661d034a996c25ae0f7146155671801180daf3

1 files changed, 2 insertions(+), 1 deletions(-)

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

@@ -100,7 +100,8 @@ data->time.minutes = seconds / 60;

seconds -= 60 * data->time.minutes; data->time.seconds = seconds; - new_percentage = (energy_now*100)/energy_full; + if(energy_full > 0) + new_percentage = (energy_now*100)/energy_full; if(battery_low_status != 0 && battery_low_status == new_percentage && data->percentage > new_percentage) { printf("battery low, executing: %s\n", battery_low_cmd);