diff options
author | Adam Jackson <ajax@redhat.com> | 2008-10-06 15:36:51 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-10-06 15:36:51 -0400 |
commit | 8a5b89e8e184f4cbf33c6dee0b06e61d8f857576 (patch) | |
tree | b042833775d237a3971eae7a7192400e064ad50d /dix | |
parent | 0b7b89fbac0b3865b2cf51295c68a5f4c7523f28 (diff) |
xalloc+memset(0) -> xcalloc
Diffstat (limited to 'dix')
-rw-r--r-- | dix/devices.c | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/dix/devices.c b/dix/devices.c index 5e0b68f3c..9d4ce3462 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -147,13 +147,10 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) if (devid >= MAX_DEVICES) return (DeviceIntPtr)NULL; - dev = (DeviceIntPtr) xcalloc(sizeof(DeviceIntRec) + sizeof(SpriteInfoRec), 1); + dev = xcalloc(sizeof(DeviceIntRec) + sizeof(SpriteInfoRec), 1); if (!dev) return (DeviceIntPtr)NULL; - dev->name = (char *)NULL; - dev->type = 0; dev->id = devid; - dev->public.on = FALSE; dev->public.processInputProc = (ProcessInputProc)NoopDDA; dev->public.realInputProc = (ProcessInputProc)NoopDDA; dev->public.enqueueInputProc = EnqueueEvent; @@ -161,51 +158,12 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) dev->startup = autoStart; /* device grab defaults */ - dev->deviceGrab.sync.frozen = FALSE; - dev->deviceGrab.sync.other = NullGrab; - dev->deviceGrab.sync.state = NOT_GRABBED; - dev->deviceGrab.sync.event = (xEvent *) NULL; - dev->deviceGrab.sync.evcount = 0; - dev->deviceGrab.grab = NullGrab; dev->deviceGrab.grabTime = currentTime; - dev->deviceGrab.fromPassiveGrab = FALSE; - dev->deviceGrab.implicitGrab = FALSE; - - dev->key = (KeyClassPtr)NULL; - dev->valuator = (ValuatorClassPtr)NULL; - dev->button = (ButtonClassPtr)NULL; - dev->focus = (FocusClassPtr)NULL; - dev->proximity = (ProximityClassPtr)NULL; - dev->absolute = (AbsoluteClassPtr)NULL; - dev->kbdfeed = (KbdFeedbackPtr)NULL; - dev->ptrfeed = (PtrFeedbackPtr)NULL; - dev->intfeed = (IntegerFeedbackPtr)NULL; - dev->stringfeed = (StringFeedbackPtr)NULL; - dev->bell = (BellFeedbackPtr)NULL; - dev->leds = (LedFeedbackPtr)NULL; -#ifdef XKB - dev->xkb_interest = NULL; -#endif - dev->config_info = NULL; - dev->devPrivates = NULL; - dev->unwrapProc = NULL; + dev->coreEvents = TRUE; - dev->inited = FALSE; - dev->enabled = FALSE; /* sprite defaults */ dev->spriteInfo = (SpriteInfoPtr)&dev[1]; - dev->spriteInfo->sprite = NULL; - dev->spriteInfo->spriteOwner = FALSE; - - /* last valuators */ - memset(dev->last.valuators, 0, sizeof(dev->last.valuators)); - memset(dev->last.remainder, 0, sizeof(dev->last.remainder)); - dev->last.numValuators = 0; - - /* device properties */ - dev->properties.properties = NULL; - dev->properties.handlers = NULL; /* security creation/labeling check */ |