mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
kdrive: add OS/platform specific bell callback
Allow OS/platform specific bell implementation. Signed-off-by: stefan11111 <stefan11111@shitposting.expert> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
8ba351aa96
commit
889dc612cf
@@ -285,7 +285,7 @@ typedef struct _KdOsFuncs {
|
||||
void (*Disable) (void);
|
||||
void (*Fini) (void);
|
||||
void (*pollEvents) (void);
|
||||
void (*Bell) (int, int, int);
|
||||
void (*Bell) (int, int, int); /* if not NULL called instead of the keyboard driver's function */
|
||||
} KdOsFuncs;
|
||||
|
||||
typedef struct _KdPointerMatrix {
|
||||
|
||||
@@ -383,6 +383,11 @@ DDXRingBell(int volume, int pitch, int duration)
|
||||
{
|
||||
KdKeyboardInfo *ki = NULL;
|
||||
|
||||
if (kdOsFuncs->Bell) {
|
||||
kdOsFuncs->Bell(volume, pitch, duration);
|
||||
return;
|
||||
}
|
||||
|
||||
for (ki = kdKeyboards; ki; ki = ki->next) {
|
||||
if (ki->dixdev->coreEvents)
|
||||
KdRingBell(ki, volume, pitch, duration);
|
||||
|
||||
Reference in New Issue
Block a user