From 35a4b8e7f4526a92d44cb16a783f21030cd1f6df Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 May 2009 16:51:59 +1000 Subject: [PATCH] xkb: remove oldState from XkbHandleActions. I really don't know what the purpose of this variable is or was, aside from potentially clobbering up our key state since there's a path where it may be used uninitialised. Also, this means that xkbi->prev_state is now accessible from the DIX with meaningful data. Signed-off-by: Peter Hutterer --- xkb/xkbActions.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index fe58a1867..417c6171c 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -1075,7 +1075,6 @@ XkbSrvInfoPtr xkbi; KeyClassPtr keyc; int changed,sendEvent; Bool genStateNotify; -XkbStateRec oldState; XkbAction act; XkbFilterPtr filter; Bool keyEvent; @@ -1090,7 +1089,7 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); /* The state may change, so if we're not in the middle of sending a state * notify, prepare for it */ if ((xkbi->flags&_XkbStateNotifyInProgress)==0) { - oldState= xkbi->state; + xkbi->prev_state = xkbi->state; xkbi->flags|= _XkbStateNotifyInProgress; genStateNotify= True; } @@ -1220,9 +1219,8 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); FixKeyState(event, dev); } - xkbi->prev_state= oldState; XkbComputeDerivedState(xkbi); - changed = XkbStateChangedFlags(&oldState,&xkbi->state); + changed = XkbStateChangedFlags(&xkbi->prev_state,&xkbi->state); if (genStateNotify) { if (changed) { xkbStateNotify sn;