From 8c9589c71d47f287588314d77ddbfcc22cd04c8a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 5 Dec 2011 11:55:58 +1000 Subject: [PATCH] Xi: rename "state" to "corestate" in ProcessDeviceEvents 'state' is shadowed by the XKB 'state' as well (which feeds into the event too), so rename this one to clarify that this is the core event state only. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas --- Xi/exevents.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 532f04e42..b2e82ec06 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -885,7 +885,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) int key = 0, rootX, rootY; ButtonClassPtr b; int ret = 0; - int state, i; + int corestate, i; DeviceIntPtr mouse = NULL, kbd = NULL; DeviceEvent *event = &ev->device_event; @@ -915,9 +915,9 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) mouse = NULL; } - /* State needs to be assembled BEFORE the device is updated. */ - state = (kbd && kbd->key) ? XkbStateFieldFromRec(&kbd->key->xkbInfo->state) : 0; - state |= (mouse && mouse->button) ? (mouse->button->state) : 0; + /* core state needs to be assembled BEFORE the device is updated. */ + corestate = (kbd && kbd->key) ? XkbStateFieldFromRec(&kbd->key->xkbInfo->state) : 0; + corestate |= (mouse && mouse->button) ? (mouse->button->state) : 0; for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++) if (BitIsOn(mouse->button->down, i)) @@ -965,7 +965,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) event->root_x = rootX; event->root_y = rootY; NoticeEventTime((InternalEvent*)event); - event->corestate = state; + event->corestate = corestate; key = event->detail.key; break; default: