dix: Return Success from ProcBell if no BellProc is set.
We must not return BadDevice, this causes applications to crash. If no BellProc is set, just quietly do nothing and report a Success.
This commit is contained in:
parent
240b10fa9c
commit
b44c1118f3
|
@ -2011,8 +2011,13 @@ ProcBell(ClientPtr client)
|
||||||
REQUEST(xBellReq);
|
REQUEST(xBellReq);
|
||||||
REQUEST_SIZE_MATCH(xBellReq);
|
REQUEST_SIZE_MATCH(xBellReq);
|
||||||
|
|
||||||
|
/* Seems like no keyboard actually has the BellProc set. Returning
|
||||||
|
* BadDevice (previous code) will make apps crash badly. The man pages
|
||||||
|
* doesn't say anything about a BadDevice being returned either.
|
||||||
|
* So just quietly do nothing and pretend everything has worked.
|
||||||
|
*/
|
||||||
if (!keybd->kbdfeed->BellProc)
|
if (!keybd->kbdfeed->BellProc)
|
||||||
return BadDevice;
|
return Success;
|
||||||
|
|
||||||
if (stuff->percent < -100 || stuff->percent > 100) {
|
if (stuff->percent < -100 || stuff->percent > 100) {
|
||||||
client->errorValue = stuff->percent;
|
client->errorValue = stuff->percent;
|
||||||
|
|
Loading…
Reference in New Issue