Commit 06fd9e33 authored by Elliot Lee's avatar Elliot Lee

Implement gdk_beep() (woohoo!)



Implement gdk_beep() (woohoo!)
parent 9ecfc48c
......@@ -23,6 +23,7 @@
#include "gdkkeysyms.h"
#include "gdkprivate-fb.h"
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <fcntl.h>
#include <time.h>
......@@ -1448,6 +1449,22 @@ tty_keyboard_open(void)
return retval;
}
void
gdk_beep (void)
{
static int pitch = 600, duration = 100;
gulong arg;
if(!keyboard)
return;
/* Thank you XFree86 */
arg = ((1193190 / pitch) & 0xffff) |
(((unsigned long)duration) << 16);
ioctl(keyboard->fd, KDMKTONE, arg);
}
void
keyboard_init(void)
{
......
......@@ -467,11 +467,6 @@ gdk_key_repeat_restore (void)
}
void
gdk_beep (void)
{
}
extern void keyboard_shutdown(void);
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment