summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-10-25 13:41:26 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-10-26 06:32:35 +1000
commit6e49be7d94455a8e27affe14a0c6a24591d063e8 (patch)
treed06ee40cf9387d77807414a6c4d4fe965d123e2d
parent3f2bc6564b38154117cc99700f6cd94100bfff0a (diff)
Move a statement down to have all allocations close together.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/mouse.c13
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) {