summaryrefslogtreecommitdiff
path: root/Xi/devbell.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-09-24 13:33:01 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-09-26 07:26:59 -0400
commit31a7994ac7365562ef1d00e0a7b25f967a961a4e (patch)
treea2054c0e371e9c62396f2e09df469142dca0a633 /Xi/devbell.c
parent56ffc381d32687242dd094395fcf2216339bab2a (diff)
Input: Return errors to the dispatcher instead of sending them ourself.
Also fixed two "unused variable: stuff" warnings.
Diffstat (limited to 'Xi/devbell.c')
-rw-r--r--Xi/devbell.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/Xi/devbell.c b/Xi/devbell.c
index ba873c7c7..83e844d93 100644
--- a/Xi/devbell.c
+++ b/Xi/devbell.c
@@ -56,12 +56,9 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include <X11/X.h> /* for inputstr.h */
-#include <X11/Xproto.h> /* Request macro */
#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
#include "extinit.h" /* LookupDeviceIntRec */
#include "exglobals.h"
@@ -108,14 +105,12 @@ ProcXDeviceBell(ClientPtr client)
dev = LookupDeviceIntRec(stuff->deviceid);
if (dev == NULL) {
client->errorValue = stuff->deviceid;
- SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadDevice);
- return Success;
+ return BadDevice;
}
if (stuff->percent < -100 || stuff->percent > 100) {
client->errorValue = stuff->percent;
- SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue);
- return Success;
+ return BadValue;
}
if (stuff->feedbackclass == KbdFeedbackClass) {
for (k = dev->kbdfeed; k; k = k->next)
@@ -123,8 +118,7 @@ ProcXDeviceBell(ClientPtr client)
break;
if (!k) {
client->errorValue = stuff->feedbackid;
- SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue);
- return Success;
+ return BadValue;
}
base = k->ctrl.bell;
proc = k->BellProc;
@@ -136,8 +130,7 @@ ProcXDeviceBell(ClientPtr client)
break;
if (!b) {
client->errorValue = stuff->feedbackid;
- SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue);
- return Success;
+ return BadValue;
}
base = b->ctrl.percent;
proc = b->BellProc;
@@ -145,8 +138,7 @@ ProcXDeviceBell(ClientPtr client)
class = BellFeedbackClass;
} else {
client->errorValue = stuff->feedbackclass;
- SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue);
- return Success;
+ return BadValue;
}
newpercent = (base * stuff->percent) / 100;
if (stuff->percent < 0)