aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_wl2/ecore_wl2_input.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-09-23 11:24:21 -0400
committerChris Michael <cp.michael@samsung.com>2015-12-03 12:02:40 -0500
commit8360fcaa580ed3b3c26d50239e102279bc1913ad (patch)
tree2d6b7933a475b64d975aed8ace4c0579af8db677 /src/lib/ecore_wl2/ecore_wl2_input.c
parentecore-wl2: Add code to send mouse wheel events (diff)
downloadefl-8360fcaa580ed3b3c26d50239e102279bc1913ad.tar.gz
ecore-wl2: Set display serial during keyboard events
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index cf37855934..39ac2f516c 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -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;