mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-06-05 21:54:23 +02:00
Compare commits
3 Commits
3826cd6050
...
3142271882
Author | SHA1 | Date | |
---|---|---|---|
|
3142271882 | ||
|
ace77b2aaa | ||
|
47d27e48d5 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,5 +6,6 @@ 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,6 +131,7 @@ 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);
|
||||||
|
|
||||||
@ -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);
|
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);
|
||||||
|
|
||||||
@ -175,6 +177,7 @@ 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,10 +33,8 @@ 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,14 +544,6 @@ 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -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,
|
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);
|
||||||
@ -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,
|
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -628,7 +618,6 @@ 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