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/opendev.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/opendev.c')
-rw-r--r-- | xorg-server/Xi/opendev.c | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/xorg-server/Xi/opendev.c b/xorg-server/Xi/opendev.c index ba0d30436..e7c00a236 100644 --- a/xorg-server/Xi/opendev.c +++ b/xorg-server/Xi/opendev.c @@ -54,11 +54,11 @@ 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 "XIstubs.h" -#include "windowstr.h" /* window structure */ +#include "windowstr.h" /* window structure */ #include "exglobals.h" #include "exevents.h" @@ -102,55 +102,56 @@ ProcXOpenDevice(ClientPtr client) status = dixLookupDevice(&dev, stuff->deviceid, client, DixUseAccess); if (status == BadDevice) { /* not open */ - for (dev = inputInfo.off_devices; dev; dev = dev->next) - if (dev->id == stuff->deviceid) - break; - if (dev == NULL) - return BadDevice; - } else if (status != Success) - return status; + for (dev = inputInfo.off_devices; dev; dev = dev->next) + if (dev->id == stuff->deviceid) + break; + if (dev == NULL) + return BadDevice; + } + else if (status != Success) + return status; if (IsMaster(dev)) - return BadDevice; + return BadDevice; if (status != Success) - return status; + return status; memset(&rep, 0, sizeof(xOpenDeviceReply)); rep.repType = X_Reply; rep.RepType = X_OpenDevice; rep.sequenceNumber = client->sequence; if (dev->key != NULL) { - evbase[j].class = KeyClass; - evbase[j++].event_type_base = event_base[KeyClass]; + evbase[j].class = KeyClass; + evbase[j++].event_type_base = event_base[KeyClass]; } if (dev->button != NULL) { - evbase[j].class = ButtonClass; - evbase[j++].event_type_base = event_base[ButtonClass]; + evbase[j].class = ButtonClass; + evbase[j++].event_type_base = event_base[ButtonClass]; } if (dev->valuator != NULL) { - evbase[j].class = ValuatorClass; - evbase[j++].event_type_base = event_base[ValuatorClass]; + evbase[j].class = ValuatorClass; + evbase[j++].event_type_base = event_base[ValuatorClass]; } if (dev->kbdfeed != NULL || dev->ptrfeed != NULL || dev->leds != NULL || - dev->intfeed != NULL || dev->bell != NULL || dev->stringfeed != NULL) { - evbase[j].class = FeedbackClass; - evbase[j++].event_type_base = event_base[FeedbackClass]; + dev->intfeed != NULL || dev->bell != NULL || dev->stringfeed != NULL) { + evbase[j].class = FeedbackClass; + evbase[j++].event_type_base = event_base[FeedbackClass]; } if (dev->focus != NULL) { - evbase[j].class = FocusClass; - evbase[j++].event_type_base = event_base[FocusClass]; + evbase[j].class = FocusClass; + evbase[j++].event_type_base = event_base[FocusClass]; } if (dev->proximity != NULL) { - evbase[j].class = ProximityClass; - evbase[j++].event_type_base = event_base[ProximityClass]; + evbase[j].class = ProximityClass; + evbase[j++].event_type_base = event_base[ProximityClass]; } evbase[j].class = OtherClass; evbase[j++].event_type_base = event_base[OtherClass]; rep.length = bytes_to_int32(j * sizeof(xInputClassInfo)); rep.num_classes = j; WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep); - WriteToClient(client, j * sizeof(xInputClassInfo), (char *)evbase); + WriteToClient(client, j * sizeof(xInputClassInfo), (char *) evbase); return Success; } @@ -166,5 +167,5 @@ SRepXOpenDevice(ClientPtr client, int size, xOpenDeviceReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, (char *) rep); } |