{
if (!ch->delete_me) continue;
_e_comp_wl_hooks[x] = eina_inlist_remove(_e_comp_wl_hooks[x], EINA_INLIST_GET(ch));
- free(ch);
+ free(ch);
}
}
wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
- if (!time) time = (uint32_t)(ecore_time_get() * 1000);
+ if (!time) time = e_input_timestamp_get();
if (pressed) state = WL_KEYBOARD_KEY_STATE_PRESSED;
else state = WL_KEYBOARD_KEY_STATE_RELEASED;
wc = wl_resource_get_client(ec->comp_data->surface);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
- if (!time) time = (uint32_t)(ecore_time_get() * 1000);
+ if (!time) time = e_input_timestamp_get();
comp_conf = e_comp_config_get();
e_keyrouter_event_surface_send(ec, keycode);
if (!dev) device = _e_comp_wl_device_last_device_get(ECORE_DEVICE_CLASS_TOUCH);
wc = wl_resource_get_client(ec->comp_data->surface);
- if (!time) time = (uint32_t)(ecore_time_get() * 1000);
+ if (!time) time = e_input_timestamp_get();
serial = wl_display_next_serial(e_comp_wl->wl.disp);
if (dev)
if (!dev) device = _e_comp_wl_device_last_device_get(ECORE_DEVICE_CLASS_TOUCH);
wc = wl_resource_get_client(ec->comp_data->surface);
- if (!time) time = (uint32_t)(ecore_time_get() * 1000);
+ if (!time) time = e_input_timestamp_get();
serial = wl_display_next_serial(e_comp_wl->wl.disp);
if (dev)
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
wc = wl_resource_get_client(ec->comp_data->surface);
- if (!time) time = (uint32_t)(ecore_time_get() * 1000);
+ if (!time) time = e_input_timestamp_get();
+ INF("timestamp = %u", time);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
wc = wl_resource_get_client(ec->comp_data->surface);
- if (!time) time = (uint32_t)(ecore_time_get() * 1000);
+ if (!time) time = e_input_timestamp_get();
serial = wl_display_next_serial(e_comp_wl->wl.disp);
if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
wc = wl_resource_get_client(ec->comp_data->surface);
- if (!time) time = (uint32_t)(ecore_time_get() * 1000);
+ if (!time) time = e_input_timestamp_get();
serial = wl_display_next_serial(e_comp_wl->wl.disp);
if (e_config->use_cursor_timer)
tbm,
img_file_fd,
img_file_size,
- ecore_time_get() * 1000,
+ e_input_timestamp_get(),
add_opts ? &opts : NULL);
}
else
tizen_remote_surface_send_update_buffer(rs->resource,
tbm,
- ecore_time_get() * 1000);
+ e_input_timestamp_get());
}
if (add_opts)
ev_key->key = (char *)eina_stringshare_add("XF86Back");
ev_key->keyname = (char *)eina_stringshare_add(ev_key->key);
ev_key->compose = (char *)eina_stringshare_add(ev_key->key);
- ev_key->timestamp = (int)(ecore_time_get()*1000);
+ ev_key->timestamp = e_input_timestamp_get();
ev_key->same_screen = 1;
ev_key->window = e_comp->ee_win;
e->window = e_comp->ee_win;
e->event_window = e_comp->ee_win;
e->root_window = e_comp->ee_win;
- e->timestamp = (int)(ecore_time_get() * 1000);
+ e->timestamp = e_input_timestamp_get();
e->same_screen = 1;
e->keycode = keycode;
key_data = E_NEW(E_Keyrouter_Event_Data, 1);
e->window = e_comp->ee_win;
e->event_window = e_comp->ee_win;
e->root_window = e_comp->ee_win;
- e->timestamp = (int)(ecore_time_get() * 1000);
+ e->timestamp = e_input_timestamp_get();
e->same_screen = 1;
e->x = x;
e->window = e_comp->ee_win;
e->event_window = e_comp->ee_win;
e->root_window = e_comp->ee_win;
- e->timestamp = (int)(ecore_time_get() * 1000);
+ e->timestamp = e_input_timestamp_get();
e->same_screen = 1;
e->x = x;
e->window = e_comp->ee_win;
e->event_window = e_comp->ee_win;
e->root_window = e_comp->ee_win;
- e->timestamp = (int)(ecore_time_get() * 1000);
+ e->timestamp = e_input_timestamp_get();
e->same_screen = 1;
/* FIXME: set current coords */
e->window = e_comp->ee_win;
e->event_window = e_comp->ee_win;
e->root_window = e_comp->ee_win;
- e->timestamp = (int)(ecore_time_get() * 1000);
+ e->timestamp = e_input_timestamp_get();
e->same_screen = 1;
e->x = x;
e->window = e_comp->ee_win;
e->event_window = e_comp->ee_win;
e->root_window = e_comp->ee_win;
- e->timestamp = (int)(ecore_time_get() * 1000);
+ e->timestamp = e_input_timestamp_get();
e->same_screen = 1;
e->x = x;
return NULL;
}
+E_API unsigned int e_input_timestamp_get(void)
+{
+ struct timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+
+ return (ts.tv_sec * 1000) + (ts.tv_nsec / 1000000);
+}
+
E_API unsigned int
e_input_touch_max_count_get()
{
EINTERN Eina_Bool e_input_evdev_mouse_accel_enable(E_Input_Evdev *edev, Eina_Bool enable);
EINTERN unsigned int e_input_evdev_touch_pressed_get(E_Input_Evdev *edev);
+E_API unsigned int e_input_timestamp_get(void);
+
E_API const Eina_List *e_input_devices_get(void);
E_API Eina_Bool e_input_device_pointer_warp(E_Input_Device *dev, int x, int y);
E_API Eina_Bool e_input_device_mouse_accel_speed_set(E_Input_Device *dev, double speed);
ev_key->key = (char *)eina_stringshare_add(keyname);
ev_key->keyname = (char *)eina_stringshare_add(ev_key->key);
ev_key->compose = (char *)eina_stringshare_add(ev_key->key);
- ev_key->timestamp = (int)(ecore_time_get()*1000);
+ ev_key->timestamp = e_input_timestamp_get();
ev_key->same_screen = 1;
ev_key->window = e_comp->ee_win;
ev->keys[0] = krt->composition_key.key[0];
ev->keys[1] = krt->composition_key.key[1];
- ev->timestamp = (unsigned int)(ecore_time_get()*1000);
+ ev->timestamp = e_input_timestamp_get();
KLINF("COMPOSITION_KEY : %s(%d) and %s(%d) composition key %s event is generated (time: %d).\n",
krt->HardKeys[ev->keys[0]].keyname, ev->keys[0],
if (gesture->set_fingers & (1 << gesture->pressed_fingers))
{
- timestamp = (int)(ecore_time_get() * 1000);
+ timestamp = e_input_timestamp_get();
gesture->status = _gesture_check(gesture, gesture->obj, gesture->c_start.x, gesture->c_start.y, timestamp);
if (gesture->status == POL_GESTURE_STATUS_ACTIVE)
{