From 029307e79a14cad5bde8f1f4a5d0a2f740271f06 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 1 Apr 2009 13:07:15 -0700 Subject: [PATCH] XQuartz: Return BadRequest when SendPSN isn't implemented rather than success (cherry picked from commit 49871e99179d5176a1ec516c8f449e2dc219faea) --- hw/xquartz/applewm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c index ef67dd482..ebfd256f8 100644 --- a/hw/xquartz/applewm.c +++ b/hw/xquartz/applewm.c @@ -500,11 +500,12 @@ ProcAppleWMSendPSN(register ClientPtr client) REQUEST_SIZE_MATCH(xAppleWMSendPSNReq); - if(appleWMProcs->SendPSN) { - err = appleWMProcs->SendPSN(stuff->psn_hi, stuff->psn_lo); - if (err != Success) { - return err; - } + if(!appleWMProcs->SendPSN) + return BadRequest; + + err = appleWMProcs->SendPSN(stuff->psn_hi, stuff->psn_lo); + if (err != Success) { + return err; } return (client->noClientException);