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:
parent
e4f5c1d3f8
commit
6994cb2a86
|
@ -2422,6 +2422,7 @@ _ecore_xcb_event_key_press(xcb_generic_event_t *event)
|
||||||
e->event_window = xevent->event;
|
e->event_window = xevent->event;
|
||||||
e->same_screen = xevent->same_screen;
|
e->same_screen = xevent->same_screen;
|
||||||
e->root_window = xevent->root;
|
e->root_window = xevent->root;
|
||||||
|
e->keycode = keycode;
|
||||||
|
|
||||||
DBG("Sending Key Down Event: %s", e->keyname);
|
DBG("Sending Key Down Event: %s", e->keyname);
|
||||||
ecore_event_add(ECORE_EVENT_KEY_DOWN, e, NULL, NULL);
|
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->event_window = xevent->event;
|
||||||
e->same_screen = xevent->same_screen;
|
e->same_screen = xevent->same_screen;
|
||||||
e->root_window = xevent->root;
|
e->root_window = xevent->root;
|
||||||
|
e->keycode = keycode;
|
||||||
|
|
||||||
ecore_event_add(ECORE_EVENT_KEY_UP, e, NULL, NULL);
|
ecore_event_add(ECORE_EVENT_KEY_UP, e, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -342,6 +342,7 @@ _ecore_key_press(int event,
|
||||||
e->event_window = xevent->window;
|
e->event_window = xevent->window;
|
||||||
e->same_screen = xevent->same_screen;
|
e->same_screen = xevent->same_screen;
|
||||||
e->root_window = xevent->root;
|
e->root_window = xevent->root;
|
||||||
|
e->keycode = xevent->keycode;
|
||||||
|
|
||||||
ecore_event_add(event, e, NULL, NULL);
|
ecore_event_add(event, e, NULL, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue