xserver: Branch 'xorg-server-1.5-apple'
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Fri Jul 31 16:27:42 PDT 2009
hw/xquartz/quartzAudio.c | 40 ++++++----------------------------------
hw/xquartz/quartzAudio.h | 3 ---
hw/xquartz/quartzKeyboard.c | 2 +-
3 files changed, 7 insertions(+), 38 deletions(-)
New commits:
commit de14a63d20095e1537fd74352850c734d900031d
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Fri Jul 31 16:09:50 2009 -0700
XQuartz: Purge redundant QuartzBell
diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c
index 8627588..8cf2417 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 c406bbc..2a78b39 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 c26134e..fd2979c 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -338,7 +338,7 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
DarwinLoadKeyboardMapping(&keySyms);
XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, keyInfo.modMap,
- QuartzBell, DarwinChangeKeyboardControl);
+ NULL, DarwinChangeKeyboardControl);
pthread_mutex_unlock(&keyInfo_mutex);
/* Get our key repeat settings from GlobalPreferences */
More information about the xorg-commit
mailing list