Compare commits

..

No commits in common. "314227188238482aa3108f20b025f07974496241" and "3826cd605094eb7db1efda0217e52bdb944e3d3b" have entirely different histories.

4 changed files with 13 additions and 4 deletions

1
.gitignore vendored
View File

@ -6,6 +6,5 @@ include/config.h
.gdb_history
*.log
wvkbd
*.1
config.h
wvkbd-mobintl

3
drw.c
View File

@ -131,7 +131,6 @@ 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);
@ -160,7 +159,6 @@ 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);
@ -177,7 +175,6 @@ 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);

2
drw.h
View File

@ -33,8 +33,10 @@ 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);
typedef union {
uint8_t bgra[4];

View File

@ -544,6 +544,14 @@ 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;
}
}
@ -576,6 +584,7 @@ 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);
@ -592,6 +601,7 @@ 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);
}
}
@ -618,6 +628,7 @@ kbd_draw_layout(struct kbd *kb)
}
next_key++;
}
drwsurf_damage(d, 0, 0, kb->w, kb->h);
}
void