From 5636971999d9a9be8063c11a301cc398754adde1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 20 Nov 2016 14:11:46 +0530 Subject: [PATCH] ... --- kitty/screen.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kitty/screen.c b/kitty/screen.c index e06082ba4..e2cafa9f0 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -116,14 +116,6 @@ dealloc(Screen* self) { Py_TYPE(self)->tp_free((PyObject*)self); } // }}} -void screen_bell(Screen UNUSED *self, uint8_t ch) { // {{{ - FILE *f = fopen("/dev/tty", "w"); - if (f != NULL) { - fwrite(&ch, 1, 1, f); - fclose(f); - } -} // }}} - // Draw text {{{ void screen_shift_out(Screen *self, uint8_t UNUSED ch) { @@ -792,6 +784,14 @@ void screen_erase_characters(Screen *self, unsigned int count) { // Device control {{{ +void screen_bell(Screen UNUSED *self, uint8_t ch) { + FILE *f = fopen("/dev/tty", "w"); + if (f != NULL) { + fwrite(&ch, 1, 1, f); + fclose(f); + } +} + static inline void callback(const char *name, Screen *self, const char *data, unsigned int sz) { if (sz) PyObject_CallMethod(self->callbacks, name, "y#", data, sz); else PyObject_CallMethod(self->callbacks, name, "y", data);