workaround broken battery blink with intel gpu

This commit is contained in:
Chris Lee 2019-03-09 12:51:33 +01:00
parent 89c02d3912
commit 10723b1db5

View file

@ -465,12 +465,6 @@ void draw_battery(void *obj, cairo_t *c)
{ {
Battery *battery = (Battery *)obj; Battery *battery = (Battery *)obj;
Panel *panel = (Panel *)battery->area.panel; 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, draw_text_area(&battery->area,
c, c,
buf_bat_line1, buf_bat_line1,
@ -481,6 +475,12 @@ void draw_battery(void *obj, cairo_t *c)
battery->bat2_posy, battery->bat2_posy,
&battery->font_color, &battery->font_color,
panel->scale); 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) void battery_dump_geometry(void *obj, int indent)