diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-10-25 13:41:26 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-10-26 06:32:35 +1000 |
commit | a48e8ce9434837d649eb88058aa9406f1bf9dce9 (patch) | |
tree | d06ee40cf9387d77807414a6c4d4fe965d123e2d /src | |
parent | f3ac92a41b9e85a0cfba011812b637b1f3ae2529 (diff) |
Move a statement down to have all allocations close together.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mouse.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mouse.c b/src/mouse.c index 3ed2b46..3cdc63a 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -898,19 +898,20 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags) pInfo->always_core_feedback = NULL; pInfo->conf_idev = dev; - /* Check if SendDragEvents has been disabled. */ - if (!xf86SetBoolOption(dev->commonOptions, "SendDragEvents", TRUE)) { - pInfo->flags &= ~XI86_SEND_DRAG_EVENTS; - } - /* Allocate the MouseDevRec and initialise it. */ if (!(pMse = calloc(sizeof(MouseDevRec), 1))) goto out; + pInfo->private = pMse; pMse->Ctrl = MouseCtrl; pMse->PostEvent = MousePostEvent; pMse->CommonOptions = MouseCommonOptions; - + + /* Check if SendDragEvents has been disabled. */ + if (!xf86SetBoolOption(dev->commonOptions, "SendDragEvents", TRUE)) { + pInfo->flags &= ~XI86_SEND_DRAG_EVENTS; + } + /* Find the protocol type. */ protocol = xf86SetStrOption(dev->commonOptions, "Protocol", NULL); if (protocol) { |