diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-05 16:51:59 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-06 14:37:32 +1000 |
commit | 35a4b8e7f4526a92d44cb16a783f21030cd1f6df (patch) | |
tree | 6743a00ccbdb01e013b4b64b8b13ae9a9c4909e4 /xkb | |
parent | d523fbe428e4513d85402caa83e9349256b680cc (diff) |
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 <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkbActions.c | 6 |
1 files 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; |