From 10723b1db5e217a94a1db2b69d3d6fd51f91a5f3 Mon Sep 17 00:00:00 2001 From: Chris Lee <@klee93> Date: Sat, 9 Mar 2019 12:51:33 +0100 Subject: [PATCH] workaround broken battery blink with intel gpu --- src/battery/battery.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/battery/battery.c b/src/battery/battery.c index efb6467..21f3649 100644 --- a/src/battery/battery.c +++ b/src/battery/battery.c @@ -465,12 +465,6 @@ void draw_battery(void *obj, cairo_t *c) { Battery *battery = (Battery *)obj; Panel *panel = (Panel *)battery->area.panel; - if (battery_warn && battery_warn_red) { - cairo_set_source_rgb(c, 0.7, 0.3, 0); - cairo_set_line_width(c, 0); - cairo_rectangle(c, 0, 0, battery->area.width, battery->area.height); - cairo_fill(c); - } draw_text_area(&battery->area, c, buf_bat_line1, @@ -481,6 +475,12 @@ void draw_battery(void *obj, cairo_t *c) battery->bat2_posy, &battery->font_color, panel->scale); + if (battery_warn && battery_warn_red) { + cairo_set_source_rgba(c, 1, 0, 0, 1); + cairo_set_line_width(c, 0); + cairo_rectangle(c, 0, 0, battery->area.width, battery->area.height); + cairo_fill(c); + } } void battery_dump_geometry(void *obj, int indent)