summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2009-08-05 16:17:01 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2009-08-05 16:17:01 -0700
commite360104880e6e2e666aa05dfd56e2ef3880f38ef (patch)
tree9e2ebe01464f4659f04fe608a4fc616e8598ea00
parent8c0085c715effdc450d78eec14bc32e6214c78af (diff)
XQuartz: Purge redundant QuartzBell
(cherry picked from commit de14a63d20095e1537fd74352850c734d900031d)
-rw-r--r--hw/xquartz/quartzAudio.c40
-rw-r--r--hw/xquartz/quartzAudio.h3
-rw-r--r--hw/xquartz/quartzKeyboard.c2
3 files changed, 7 insertions, 38 deletions
diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c
index 8627588f4..8cf241738 100644
--- a/hw/xquartz/quartzAudio.c
+++ b/hw/xquartz/quartzAudio.c
@@ -219,6 +219,12 @@ void DDXRingBell(
int pitch, // pitch is Hz
int duration ) // duration is milliseconds
{
+ if (quartzUseSysBeep) {
+ if (volume)
+ NSBeep();
+ return;
+ }
+
if (quartzAudioDevice == kAudioDeviceUnknown) return;
pthread_mutex_lock(&data.lock);
@@ -247,40 +253,6 @@ void DDXRingBell(
pthread_mutex_unlock(&data.lock);
}
-
-/*
- * QuartzBell
- * Ring the bell
- */
-void QuartzBell(
- int volume, // volume in percent of max
- DeviceIntPtr pDevice,
- pointer ctrl,
- int class )
-{
- int pitch; // pitch in Hz
- int duration; // duration in milliseconds
-
- if (class == BellFeedbackClass) {
- pitch = ((BellCtrl*)ctrl)->pitch;
- duration = ((BellCtrl*)ctrl)->duration;
- } else if (class == KbdFeedbackClass) {
- pitch = ((KeybdCtrl*)ctrl)->bell_pitch;
- duration = ((KeybdCtrl*)ctrl)->bell_duration;
- } else {
- ErrorF("QuartzBell: bad bell class %d\n", class);
- return;
- }
-
- if (quartzUseSysBeep) {
- if (volume)
- NSBeep();
- } else {
- DDXRingBell(volume, pitch, duration);
- }
-}
-
-
/*
* QuartzAudioInit
* Prepare to play the bell with the CoreAudio API
diff --git a/hw/xquartz/quartzAudio.h b/hw/xquartz/quartzAudio.h
index c406bbc2a..2a78b3957 100644
--- a/hw/xquartz/quartzAudio.h
+++ b/hw/xquartz/quartzAudio.h
@@ -32,9 +32,6 @@
#ifndef _QUARTZAUDIO_H
#define _QUARTZAUDIO_H
-#include "input.h"
-
void QuartzAudioInit(void);
-void QuartzBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class);
#endif
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index ca0a527ee..4abf4af7f 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -327,7 +327,7 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
/* We need to really have rules... or something... */
//XkbSetRulesDflts("base", "pc105", "us", NULL, NULL);
- InitKeyboardDeviceStruct(pDev, NULL, QuartzBell, DarwinChangeKeyboardControl);
+ InitKeyboardDeviceStruct(pDev, NULL, NULL, DarwinChangeKeyboardControl);
pthread_mutex_lock(&keyInfo_mutex);
DarwinLoadKeyboardMapping(&keySyms);