From 0c3e0ef9adb03055c9863836c36888c72f00ae83 Mon Sep 17 00:00:00 2001 From: Vince Martinez Date: Sun, 7 Jul 2013 03:54:27 +0100 Subject: [PATCH 2/2] [minor] deleting commented code --- tools/syndaemon.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/syndaemon.c b/tools/syndaemon.c index a3f9539..8b782b3 100644 --- a/tools/syndaemon.c +++ b/tools/syndaemon.c @@ -200,7 +200,10 @@ typedef struct { static int trackpoint_activity(Display * display) { - size_t i; + static CursorPosition *old_tppos = NULL; + CursorPosition *tppos; + + int i; int ret = 0; int diff_x = 0, diff_y = 0; @@ -208,9 +211,6 @@ trackpoint_activity(Display * display) XInputClass *data; XValuatorState *val_state; - static CursorPosition *old_tppos = NULL; //{-1, -1}; - CursorPosition *tppos; - state = XQueryDeviceState(display, tp_dev); /* Get current Trackpoint coordinates */ @@ -235,13 +235,12 @@ trackpoint_activity(Display * display) } } - /* Copy over old values */ if(!old_tppos) { old_tppos = (CursorPosition *) malloc(sizeof(CursorPosition)); } + + /* Copy over old values */ memcpy(old_tppos, tppos, sizeof(tppos)); - //old_tppos.x = tppos->x; - //old_tppos.y = tppos->y; return ret; } -- 1.8.3.2