ecore-wl2: Set display serial during keyboard events

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-09-23 11:24:21 -04:00
parent c0e03359e5
commit 8360fcaa58
1 changed files with 11 additions and 3 deletions

View File

@ -355,9 +355,15 @@ _keyboard_cb_enter(void *data, struct wl_keyboard *keyboard EINA_UNUSED, unsigne
input = data;
if (!input) return;
/* TODO: Set display->serial ?? */
input->display->serial = serial;
/* TODO: Set input timestamp ?? */
if (!input->timestamp)
{
struct timeval tv;
gettimeofday(&tv, NULL);
input->timestamp = (tv.tv_sec * 1000 + tv.tv_usec / 1000);
}
/* find the window which this surface belongs to */
window = _ecore_wl2_display_window_surface_find(input->display, surface);
@ -377,7 +383,7 @@ _keyboard_cb_leave(void *data, struct wl_keyboard *keyboard EINA_UNUSED, unsigne
input = data;
if (!input) return;
/* TODO: Set display->serial ?? */
input->display->serial = serial;
input->repeat.sym = 0;
input->repeat.key = 0;
@ -433,6 +439,8 @@ _keyboard_cb_key(void *data, struct wl_keyboard *keyboard EINA_UNUSED, unsigned
window = input->focus.keyboard;
if (!window) return;
input->display->serial = serial;
/* xkb rules reflect X broken keycodes, so offset by 8 */
code = keycode + 8;