diff options
author | Mihai Moldovan <ionic@ionic.de> | 2018-02-26 01:00:54 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2018-02-26 01:00:54 +0100 |
commit | 05152b788ab184f45df1f64182791c88a09dc6f9 (patch) | |
tree | 4232012c65ee251fef529950a420689154778847 /nx-X11/programs/Xserver/Xi/chgprop.c | |
parent | e247900edd20c140faf42ba0759bf59cbd2f75ae (diff) | |
parent | 4598c0c3d215f7f2237a9ccee3a143025f2af005 (diff) | |
download | nx-libs-05152b788ab184f45df1f64182791c88a09dc6f9.tar.gz nx-libs-05152b788ab184f45df1f64182791c88a09dc6f9.tar.bz2 nx-libs-05152b788ab184f45df1f64182791c88a09dc6f9.zip |
Merge branch 'uli42-pr/update_xi' into arctica-3.6.x
Attributes GH PR #644: https://github.com/ArcticaProject/nx-libs/pull/644
Diffstat (limited to 'nx-X11/programs/Xserver/Xi/chgprop.c')
-rw-r--r-- | nx-X11/programs/Xserver/Xi/chgprop.c | 83 |
1 files changed, 39 insertions, 44 deletions
diff --git a/nx-X11/programs/Xserver/Xi/chgprop.c b/nx-X11/programs/Xserver/Xi/chgprop.c index 80b8aea5f..b8d0403bf 100644 --- a/nx-X11/programs/Xserver/Xi/chgprop.c +++ b/nx-X11/programs/Xserver/Xi/chgprop.c @@ -55,14 +55,14 @@ SOFTWARE. #include <dix-config.h> #endif -#include <nx-X11/X.h> /* for inputstr.h */ -#include <nx-X11/Xproto.h> /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" #include <nx-X11/extensions/XI.h> #include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ +#include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" #include "exglobals.h" @@ -77,9 +77,8 @@ SOFTWARE. */ int -SProcXChangeDeviceDontPropagateList(client) - register ClientPtr client; - { +SProcXChangeDeviceDontPropagateList(register ClientPtr client) +{ REQUEST(xChangeDeviceDontPropagateListReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); @@ -88,8 +87,8 @@ SProcXChangeDeviceDontPropagateList(client) REQUEST_FIXED_SIZE(xChangeDeviceDontPropagateListReq, stuff->count * sizeof(CARD32)); SwapLongs((CARD32 *) (&stuff[1]), stuff->count); - return(ProcXChangeDeviceDontPropagateList(client)); - } + return (ProcXChangeDeviceDontPropagateList(client)); +} /*********************************************************************** * @@ -98,51 +97,47 @@ SProcXChangeDeviceDontPropagateList(client) */ int -ProcXChangeDeviceDontPropagateList (client) - register ClientPtr client; - { - int i; - WindowPtr pWin; - struct tmask tmp[EMASKSIZE]; - OtherInputMasks *others; +ProcXChangeDeviceDontPropagateList(register ClientPtr client) +{ + int i; + WindowPtr pWin; + struct tmask tmp[EMASKSIZE]; + OtherInputMasks *others; REQUEST(xChangeDeviceDontPropagateListReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); - if (stuff->length !=(sizeof(xChangeDeviceDontPropagateListReq)>>2) + - stuff->count) - { - SendErrorToClient (client, IReqCode, X_ChangeDeviceDontPropagateList, 0, - BadLength); + if (stuff->length != (sizeof(xChangeDeviceDontPropagateListReq) >> 2) + + stuff->count) { + SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0, + BadLength); return Success; - } + } - pWin = (WindowPtr) LookupWindow (stuff->window, client); - if (!pWin) - { + pWin = (WindowPtr) LookupWindow(stuff->window, client); + if (!pWin) { client->errorValue = stuff->window; - SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0, - BadWindow); + SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0, + BadWindow); return Success; - } + } - if (stuff->mode != AddToList && stuff->mode != DeleteFromList) - { + if (stuff->mode != AddToList && stuff->mode != DeleteFromList) { client->errorValue = stuff->window; - SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0, - BadMode); + SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0, + BadMode); return Success; - } + } - if (CreateMaskFromList (client, (XEventClass *)&stuff[1], - stuff->count, tmp, NULL, X_ChangeDeviceDontPropagateList) != Success) - return Success; + if (CreateMaskFromList(client, (XEventClass *) & stuff[1], + stuff->count, tmp, NULL, + X_ChangeDeviceDontPropagateList) != Success) + return Success; others = wOtherInputMasks(pWin); if (!others && stuff->mode == DeleteFromList) return Success; - for (i=0; i<EMASKSIZE; i++) - { + for (i = 0; i < EMASKSIZE; i++) { if (tmp[i].mask == 0) continue; @@ -151,13 +146,13 @@ ProcXChangeDeviceDontPropagateList (client) else if (others) tmp[i].mask |= others->dontPropagateMask[i]; - if (DeviceEventSuppressForWindow (pWin,client,tmp[i].mask,i) != Success) - { - SendErrorToClient ( client, IReqCode, X_ChangeDeviceDontPropagateList, 0, - BadClass); + if (DeviceEventSuppressForWindow(pWin, client, tmp[i].mask, i) != + Success) { + SendErrorToClient(client, IReqCode, + X_ChangeDeviceDontPropagateList, 0, BadClass); return Success; - } } + } return Success; - } +} |