eina_iterator_free(itr);
}
+static void
+_ecore_wl_input_device_last_device_set(Ecore_Wl_Input_Device *dev)
+{
+ Ecore_Wl_Input *input = _ecore_wl_disp->input;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (!input) return;
+
+ switch(dev->clas)
+ {
+ case ECORE_DEVICE_CLASS_MOUSE:
+ input->last_device_ptr = dev;
+ break;
+ case ECORE_DEVICE_CLASS_KEYBOARD:
+ input->last_device_kbd = dev;
+ break;
+ case ECORE_DEVICE_CLASS_TOUCH:
+ input->last_device_touch = dev;
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+_ecore_wl_input_device_last_device_unset(Ecore_Wl_Input_Device *dev)
+{
+ Ecore_Wl_Input *input = _ecore_wl_disp->input;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (!input) return;
+
+ switch(dev->clas)
+ {
+ case ECORE_DEVICE_CLASS_MOUSE:
+ if (input->last_device_ptr == dev)
+ input->last_device_ptr = NULL;
+ break;
+ case ECORE_DEVICE_CLASS_KEYBOARD:
+ if (input->last_device_kbd == dev)
+ input->last_device_kbd = NULL;
+ break;
+ case ECORE_DEVICE_CLASS_TOUCH:
+ if (input->last_device_touch == dev)
+ input->last_device_touch = NULL;
+ break;
+ default:
+ break;
+ }
+}
+
void
_ecore_wl_input_devices_send(Ecore_Wl_Input *input, Ecore_Wl_Window *win)
{
{
_ecore_wl_input_device_info_broadcast(dev->name, dev->identifier, dev->clas, EINA_FALSE);
+ _ecore_wl_input_device_last_device_unset(dev);
+
if (dev->tz_device) tizen_input_device_release(dev->tz_device);
if (dev->name) eina_stringshare_del(dev->name);
if (dev->identifier) eina_stringshare_del(dev->identifier);
}
static void
-_ecore_wl_input_device_last_device_set(Ecore_Wl_Input_Device *dev)
-{
- Ecore_Wl_Input *input = _ecore_wl_disp->input;
-
- LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (!input) return;
-
- switch(dev->clas)
- {
- case ECORE_DEVICE_CLASS_MOUSE:
- input->last_device_ptr = dev;
- break;
- case ECORE_DEVICE_CLASS_KEYBOARD:
- input->last_device_kbd = dev;
- break;
- case ECORE_DEVICE_CLASS_TOUCH:
- input->last_device_touch = dev;
- break;
- default:
- break;
- }
-}
-
-static void
_ecore_wl_input_device_cb_event_device(void *data, struct tizen_input_device *tizen_input_device EINA_UNUSED, unsigned int serial EINA_UNUSED, const char *name EINA_UNUSED, uint32_t time EINA_UNUSED)
{
Ecore_Wl_Input *input = _ecore_wl_disp->input;