mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-07-12 22:14:32 +02:00
only commit surface when it changed
Previously wvkbd would commit an (usually) unchanged surface at the framerate of the compositor, this only commits the buffer when we render something new. Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
committed by
Maarten van Gompel
parent
a2cacb7e25
commit
1843e60a74
@ -207,6 +207,8 @@ kbd_release_key(struct kbd *kb, uint32_t time) {
|
||||
kbd_draw_layout(kb);
|
||||
kb->last_swipe = NULL;
|
||||
}
|
||||
|
||||
drwsurf_flip(kb->surf);
|
||||
}
|
||||
|
||||
void
|
||||
@ -230,6 +232,8 @@ kbd_motion_key(struct kbd *kb, uint32_t time, uint32_t x, uint32_t y) {
|
||||
} else {
|
||||
kbd_unpress_key(kb, time);
|
||||
}
|
||||
|
||||
drwsurf_flip(kb->surf);
|
||||
}
|
||||
|
||||
void
|
||||
@ -336,6 +340,8 @@ kbd_press_key(struct kbd *kb, struct key *k, uint32_t time) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
drwsurf_flip(kb->surf);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user