aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-04-25 00:27:09 -0400
committerJesse Luehrs <doy@tozt.net>2014-04-25 00:27:09 -0400
commitc34883a6bbc3fdc15adfea50e9e58efa7b783bc7 (patch)
tree5c02e349582ceaaa531579439beccd5416a8510a
parentfbdfec3cb1a2b9eaf383dd47fa1d54ccf501f4fa (diff)
downloadrunes-c34883a6bbc3fdc15adfea50e9e58efa7b783bc7.tar.gz
runes-c34883a6bbc3fdc15adfea50e9e58efa7b783bc7.zip
implement bells
-rw-r--r--src/screen.c6
-rw-r--r--src/window-xlib.c10
2 files changed, 12 insertions, 4 deletions
diff --git a/src/screen.c b/src/screen.c
index 3d358b7..459f136 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -39,14 +39,12 @@ void runes_screen_process_string(RunesTerm *t, char *buf, size_t len)
void runes_screen_audible_bell(RunesTerm *t)
{
- UNUSED(t);
- fprintf(stderr, "audible_bell nyi\n");
+ t->scr.audible_bell = 1;
}
void runes_screen_visual_bell(RunesTerm *t)
{
- UNUSED(t);
- fprintf(stderr, "visual_bell nyi\n");
+ t->scr.visual_bell = 1;
}
void runes_screen_show_string_ascii(RunesTerm *t, char *buf, size_t len)
diff --git a/src/window-xlib.c b/src/window-xlib.c
index fcb13ef..9b7b228 100644
--- a/src/window-xlib.c
+++ b/src/window-xlib.c
@@ -443,6 +443,16 @@ static void runes_window_backend_resize_window(
static void runes_window_backend_flush(RunesTerm *t)
{
+ if (t->scr.audible_bell) {
+ runes_window_backend_audible_bell(t);
+ t->scr.audible_bell = 0;
+ }
+
+ if (t->scr.visual_bell) {
+ runes_window_backend_visual_bell(t);
+ t->scr.visual_bell = 0;
+ }
+
if (t->visual_bell_is_ringing) {
return;
}