diff options
author | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
commit | 0f834b91a4768673833ab4917e87d86c237bb1a6 (patch) | |
tree | 363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/Xi/devbell.c | |
parent | fc72edebf875378459368c5383d9023730cbca54 (diff) | |
download | vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2 vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip |
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/Xi/devbell.c')
-rw-r--r-- | xorg-server/Xi/devbell.c | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/xorg-server/Xi/devbell.c b/xorg-server/Xi/devbell.c index 881524260..c75b94dee 100644 --- a/xorg-server/Xi/devbell.c +++ b/xorg-server/Xi/devbell.c @@ -54,7 +54,7 @@ SOFTWARE. #include <dix-config.h> #endif -#include "inputstr.h" /* DeviceIntPtr */ +#include "inputstr.h" /* DeviceIntPtr */ #include <X11/extensions/XI.h> #include <X11/extensions/XIproto.h> #include "exglobals.h" @@ -99,47 +99,49 @@ ProcXDeviceBell(ClientPtr client) rc = dixLookupDevice(&dev, stuff->deviceid, client, DixBellAccess); if (rc != Success) { - client->errorValue = stuff->deviceid; - return rc; + client->errorValue = stuff->deviceid; + return rc; } if (stuff->percent < -100 || stuff->percent > 100) { - client->errorValue = stuff->percent; - return BadValue; + client->errorValue = stuff->percent; + return BadValue; } if (stuff->feedbackclass == KbdFeedbackClass) { - for (k = dev->kbdfeed; k; k = k->next) - if (k->ctrl.id == stuff->feedbackid) - break; - if (!k) { - client->errorValue = stuff->feedbackid; - return BadValue; - } - base = k->ctrl.bell; - proc = k->BellProc; - ctrl = (pointer) & (k->ctrl); - class = KbdFeedbackClass; - } else if (stuff->feedbackclass == BellFeedbackClass) { - for (b = dev->bell; b; b = b->next) - if (b->ctrl.id == stuff->feedbackid) - break; - if (!b) { - client->errorValue = stuff->feedbackid; - return BadValue; - } - base = b->ctrl.percent; - proc = b->BellProc; - ctrl = (pointer) & (b->ctrl); - class = BellFeedbackClass; - } else { - client->errorValue = stuff->feedbackclass; - return BadValue; + for (k = dev->kbdfeed; k; k = k->next) + if (k->ctrl.id == stuff->feedbackid) + break; + if (!k) { + client->errorValue = stuff->feedbackid; + return BadValue; + } + base = k->ctrl.bell; + proc = k->BellProc; + ctrl = (pointer) &(k->ctrl); + class = KbdFeedbackClass; + } + else if (stuff->feedbackclass == BellFeedbackClass) { + for (b = dev->bell; b; b = b->next) + if (b->ctrl.id == stuff->feedbackid) + break; + if (!b) { + client->errorValue = stuff->feedbackid; + return BadValue; + } + base = b->ctrl.percent; + proc = b->BellProc; + ctrl = (pointer) &(b->ctrl); + class = BellFeedbackClass; + } + else { + client->errorValue = stuff->feedbackclass; + return BadValue; } newpercent = (base * stuff->percent) / 100; if (stuff->percent < 0) - newpercent = base + newpercent; + newpercent = base + newpercent; else - newpercent = base - newpercent + stuff->percent; + newpercent = base - newpercent + stuff->percent; (*proc) (newpercent, dev, ctrl, class); return Success; |