mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-06-06 14:14:23 +02:00
Compare commits
No commits in common. "314227188238482aa3108f20b025f07974496241" and "3826cd605094eb7db1efda0217e52bdb944e3d3b" have entirely different histories.
3142271882
...
3826cd6050
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,6 +6,5 @@ include/config.h
|
|||||||
.gdb_history
|
.gdb_history
|
||||||
*.log
|
*.log
|
||||||
wvkbd
|
wvkbd
|
||||||
*.1
|
|
||||||
config.h
|
config.h
|
||||||
wvkbd-mobintl
|
wvkbd-mobintl
|
||||||
|
3
drw.c
3
drw.c
@ -131,7 +131,6 @@ drw_draw_text(struct drwsurf *ds, Color color, uint32_t x, uint32_t y,
|
|||||||
{
|
{
|
||||||
drwsurf_flip(ds);
|
drwsurf_flip(ds);
|
||||||
struct drwbuf *d = ds->back_buffer;
|
struct drwbuf *d = ds->back_buffer;
|
||||||
drwsurf_damage(ds, x, y, w, h);
|
|
||||||
|
|
||||||
cairo_save(d->cairo);
|
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);
|
drwsurf_flip(ds);
|
||||||
struct drwbuf *d = ds->back_buffer;
|
struct drwbuf *d = ds->back_buffer;
|
||||||
drwsurf_damage(ds, x, y, w, h);
|
|
||||||
|
|
||||||
cairo_save(d->cairo);
|
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);
|
drwsurf_flip(ds);
|
||||||
struct drwbuf *d = ds->back_buffer;
|
struct drwbuf *d = ds->back_buffer;
|
||||||
drwsurf_damage(ds, x, y, w, h);
|
|
||||||
|
|
||||||
cairo_save(d->cairo);
|
cairo_save(d->cairo);
|
||||||
|
|
||||||
|
2
drw.h
2
drw.h
@ -33,8 +33,10 @@ struct drwsurf {
|
|||||||
};
|
};
|
||||||
struct kbd;
|
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_resize(struct drwsurf *ds, uint32_t w, uint32_t h, double s);
|
||||||
void drwsurf_attach(struct drwsurf *ds);
|
void drwsurf_attach(struct drwsurf *ds);
|
||||||
|
void drwsurf_flip(struct drwsurf *ds);
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
uint8_t bgra[4];
|
uint8_t bgra[4];
|
||||||
|
11
keyboard.c
11
keyboard.c
@ -544,6 +544,14 @@ kbd_clear_last_popup(struct kbd *kb)
|
|||||||
if (kb->last_popup_w && kb->last_popup_h) {
|
if (kb->last_popup_w && kb->last_popup_h) {
|
||||||
drw_do_clear(kb->popup_surf, kb->last_popup_x, kb->last_popup_y,
|
drw_do_clear(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);
|
||||||
|
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;
|
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,
|
drw_draw_text(kb->surf, scheme->text, k->x, k->y, k->w, k->h,
|
||||||
KBD_KEY_BORDER, label, scheme->font_description);
|
KBD_KEY_BORDER, label, scheme->font_description);
|
||||||
|
drwsurf_damage(kb->surf, k->x, k->y, k->w, k->h);
|
||||||
|
|
||||||
if (type == Press || type == Unpress) {
|
if (type == Press || type == Unpress) {
|
||||||
kbd_clear_last_popup(kb);
|
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,
|
drw_draw_text(kb->popup_surf, scheme->text, k->x, kb->last_popup_y,
|
||||||
k->w, k->h, KBD_KEY_BORDER, label,
|
k->w, k->h, KBD_KEY_BORDER, label,
|
||||||
scheme->font_description);
|
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++;
|
next_key++;
|
||||||
}
|
}
|
||||||
|
drwsurf_damage(d, 0, 0, kb->w, kb->h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user