all repos — tint2 @ 5c474f42568f8f0c623c5e2714ce88e02487bd74

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

Fix battery showing/hiding (issue #531)
o9000 mrovi9000@gmail.com
commit

5c474f42568f8f0c623c5e2714ce88e02487bd74

parent

333ed7a20767f78ec2356b19fc0c5b879e6a4f23

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

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

@@ -81,21 +81,6 @@ else

tint_exec(ac_disconnected_cmd); } - if (old_found == battery_found && old_percentage == battery_state.percentage && - old_hours == battery_state.time.hours && old_minutes == battery_state.time.minutes) { - return; - } - - if (battery_state.percentage < battery_low_status && battery_state.state == BATTERY_DISCHARGING && - !battery_low_cmd_sent) { - tint_exec(battery_low_cmd); - battery_low_cmd_sent = 1; - } - if (battery_state.percentage > battery_low_status && battery_state.state == BATTERY_CHARGING && - battery_low_cmd_sent) { - battery_low_cmd_sent = 0; - } - int i; for (i = 0; i < num_panels; i++) { if (!battery_found) {

@@ -120,6 +105,21 @@ if (panels[i].battery.area.on_screen) {

panels[i].battery.area.resize_needed = 1; panel_refresh = TRUE; } + } + + if (old_found == battery_found && old_percentage == battery_state.percentage && + old_hours == battery_state.time.hours && old_minutes == battery_state.time.minutes) { + return; + } + + if (battery_state.percentage < battery_low_status && battery_state.state == BATTERY_DISCHARGING && + !battery_low_cmd_sent) { + tint_exec(battery_low_cmd); + battery_low_cmd_sent = 1; + } + if (battery_state.percentage > battery_low_status && battery_state.state == BATTERY_CHARGING && + battery_low_cmd_sent) { + battery_low_cmd_sent = 0; } }