diff --git a/drw.c b/drw.c index eb22354..89ec8d8 100644 --- a/drw.c +++ b/drw.c @@ -131,6 +131,7 @@ drw_draw_text(struct drwsurf *ds, Color color, uint32_t x, uint32_t y, { drwsurf_flip(ds); struct drwbuf *d = ds->back_buffer; + drwsurf_damage(ds, x, y, w, h); cairo_save(d->cairo); @@ -159,6 +160,7 @@ drw_do_clear(struct drwsurf *ds, uint32_t x, uint32_t y, uint32_t w, uint32_t h) { drwsurf_flip(ds); struct drwbuf *d = ds->back_buffer; + drwsurf_damage(ds, x, y, w, h); cairo_save(d->cairo); @@ -175,6 +177,7 @@ drw_do_rectangle(struct drwsurf *ds, Color color, uint32_t x, uint32_t y, { drwsurf_flip(ds); struct drwbuf *d = ds->back_buffer; + drwsurf_damage(ds, x, y, w, h); cairo_save(d->cairo); diff --git a/drw.h b/drw.h index eae3f78..a2648d1 100644 --- a/drw.h +++ b/drw.h @@ -33,7 +33,6 @@ struct drwsurf { }; struct kbd; -void drwsurf_damage(struct drwsurf *ds, uint32_t x, uint32_t y, uint32_t w, uint32_t h); void drwsurf_resize(struct drwsurf *ds, uint32_t w, uint32_t h, double s); void drwsurf_attach(struct drwsurf *ds); void drwsurf_flip(struct drwsurf *ds); diff --git a/keyboard.c b/keyboard.c index 998fd98..d158403 100644 --- a/keyboard.c +++ b/keyboard.c @@ -544,14 +544,6 @@ kbd_clear_last_popup(struct kbd *kb) if (kb->last_popup_w && kb->last_popup_h) { drw_do_clear(kb->popup_surf, kb->last_popup_x, kb->last_popup_y, kb->last_popup_w, kb->last_popup_h); - drwsurf_damage( - kb->popup_surf, - kb->last_popup_x, - kb->last_popup_y, - kb->last_popup_w, - kb->last_popup_h - ); - kb->last_popup_w = kb->last_popup_h = 0; } } @@ -584,7 +576,6 @@ kbd_draw_key(struct kbd *kb, struct key *k, enum key_draw_type type) drw_draw_text(kb->surf, scheme->text, k->x, k->y, k->w, k->h, KBD_KEY_BORDER, label, scheme->font_description); - drwsurf_damage(kb->surf, k->x, k->y, k->w, k->h); if (type == Press || type == Unpress) { kbd_clear_last_popup(kb); @@ -601,7 +592,6 @@ kbd_draw_key(struct kbd *kb, struct key *k, enum key_draw_type type) drw_draw_text(kb->popup_surf, scheme->text, k->x, kb->last_popup_y, k->w, k->h, KBD_KEY_BORDER, label, scheme->font_description); - drwsurf_damage(kb->popup_surf, k->x, kb->last_popup_y, k->w, k->h); } } @@ -628,7 +618,6 @@ kbd_draw_layout(struct kbd *kb) } next_key++; } - drwsurf_damage(d, 0, 0, kb->w, kb->h); } void