mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-08-30 07:42:09 +02:00
Tie the damage tracking to the drawing methods
So that keyboard.c just need to draw things, and stop worring about damaging.
This commit is contained in:
11
keyboard.c
11
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
|
||||
|
Reference in New Issue
Block a user