ecore-x: Set keycode in ecore_event structure during key press/release events

bugfix@: As we have support in the Ecore_Event structure for storing
keycode on key press/release, let's utilize it. This will simplify
wayland compositor code as we won't have to parse key names to get the
keycode.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-05-06 13:09:20 +01:00
parent e4f5c1d3f8
commit 6994cb2a86
2 changed files with 3 additions and 0 deletions

View File

@ -2422,6 +2422,7 @@ _ecore_xcb_event_key_press(xcb_generic_event_t *event)
e->event_window = xevent->event;
e->same_screen = xevent->same_screen;
e->root_window = xevent->root;
e->keycode = keycode;
DBG("Sending Key Down Event: %s", e->keyname);
ecore_event_add(ECORE_EVENT_KEY_DOWN, e, NULL, NULL);
@ -2491,6 +2492,7 @@ _ecore_xcb_event_key_release(xcb_generic_event_t *event)
e->event_window = xevent->event;
e->same_screen = xevent->same_screen;
e->root_window = xevent->root;
e->keycode = keycode;
ecore_event_add(ECORE_EVENT_KEY_UP, e, NULL, NULL);
}

View File

@ -342,6 +342,7 @@ _ecore_key_press(int event,
e->event_window = xevent->window;
e->same_screen = xevent->same_screen;
e->root_window = xevent->root;
e->keycode = xevent->keycode;
ecore_event_add(event, e, NULL, NULL);