[PATCH mouse 18/23] Move a statement down to have all allocations close together.
Peter Hutterer
peter.hutterer at who-t.net
Sun Oct 24 23:25:26 PDT 2010
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
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) {
--
1.7.2.3
More information about the xorg-devel
mailing list